lib/geocoder/lookups/latlon.rb in geocoder-1.6.2 vs lib/geocoder/lookups/latlon.rb in geocoder-1.6.3
- old
+ new
@@ -23,11 +23,10 @@
if doc['error'].nil?
[doc]
# The API returned a 404 response, which indicates no results found
elsif doc['error']['type'] == 'api_error'
[]
- elsif
- doc['error']['type'] == 'authentication_error'
+ elsif doc['error']['type'] == 'authentication_error'
raise_error(Geocoder::InvalidApiKey) ||
Geocoder.log(:warn, "LatLon.io service error: invalid API key.")
else
[]
end