We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8b1d48 commit 26a0c96Copy full SHA for 26a0c96
lib/geocoder/lookups/ipgeolocation.rb
@@ -37,14 +37,7 @@ def query_url_params(query)
37
def results(query)
38
# don't look up a loopback or private address, just return the stored result
39
return [reserved_result(query.text)] if query.internal_ip_address?
40
- return [] unless doc = fetch_data(query)
41
- if error = doc['error']
42
- code = error['code']
43
- msg = error['info']
44
- raise_error(ERROR_CODES[code], msg ) || Geocoder.log(:warn, "Ipgeolocation Geocoding API error: #{msg}")
45
- return []
46
- end
47
- [doc]
+ [fetch_data(query)]
48
end
49
50
def reserved_result(ip)
0 commit comments