I have built an app with Rails. I have a large list of addresses which I am standardizing via the Bing/Google API using Geocoder. This is my current call to get the adddress info:
Geocoder.search(address)
This works perfectly fine and I can parse the response JSON. However when I leave the script running it sometimes falls over with the following error:
Zlib::BufError: buffer error
Instead of the script falling over I would like to catch this error and continue with the script. How could I do this with Ruby? I am not sure which exception to catch, if any.