lib/geocoder/lookups/geocodio.rb in geocoder-1.2.7 vs lib/geocoder/lookups/geocodio.rb in geocoder-1.2.8
- old
+ new
@@ -17,16 +17,16 @@
return [] unless doc = fetch_data(query)
return doc["results"] if doc['error'].nil?
if doc['error'] == 'Invalid API key'
raise_error(Geocoder::InvalidApiKey) ||
- warn("Geocodio service error: invalid API key.")
+ Geocoder.log(:warn, "Geocodio service error: invalid API key.")
elsif doc['error'].match(/You have reached your daily maximum/)
raise_error(Geocoder::OverQueryLimitError, doc['error']) ||
- warn("Geocodio service error: #{doc['error']}.")
+ Geocoder.log(:warn, "Geocodio service error: #{doc['error']}.")
else
raise_error(Geocoder::InvalidRequest, doc['error']) ||
- warn("Geocodio service error: #{doc['error']}.")
+ Geocoder.log(:warn, "Geocodio service error: #{doc['error']}.")
end
[]
end
private # ---------------------------------------------------------------