Skip to content
Snippets Groups Projects
Commit 8b76c452 authored by Andrew Kane's avatar Andrew Kane
Browse files

Raise Geocoder::LookupTimeout

parent 83a3cb5c
No related branches found
No related tags found
No related merge requests found
...@@ -29,4 +29,7 @@ module Geocoder ...@@ -29,4 +29,7 @@ module Geocoder
class ServiceUnavailable < Error class ServiceUnavailable < Error
end end
class LookupTimeout < ::Timeout::Error
end
end end
...@@ -274,6 +274,8 @@ module Geocoder ...@@ -274,6 +274,8 @@ module Geocoder
end end
client.request(req) client.request(req)
end end
rescue Net::OpenTimeout, Net::ReadTimeout
raise Geocoder::LookupTimeout
end end
def use_ssl? def use_ssl?
......
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