Skip to content
Snippets Groups Projects
Unverified Commit a0828002 authored by Alex Reisner's avatar Alex Reisner Committed by GitHub
Browse files

Merge pull request #1380 from meetme2meat/bug/rescue-network-error

Rescue the Geocoder::NetworkError to stay consistent with the README.md
parents eeb898b1 f9d16c4a
No related branches found
No related tags found
No related merge requests found
......@@ -197,6 +197,8 @@ module Geocoder
raise_error(err) or Geocoder.log(:warn, "Geocoding API connection cannot be established.")
rescue Errno::ECONNREFUSED => err
raise_error(err) or Geocoder.log(:warn, "Geocoding API connection refused.")
rescue Geocoder::NetworkError => err
raise_error(err) or Geocoder.log(:warn, "Geocoding API connection is either unreacheable or reset by the peer")
rescue Timeout::Error => err
raise_error(err) or Geocoder.log(:warn, "Geocoding API not responding fast enough " +
"(use Geocoder.configure(:timeout => ...) to set limit).")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment