Skip to content
Snippets Groups Projects
Commit f1d21b44 authored by Alex Reisner's avatar Alex Reisner
Browse files

Fix HTTP response code names.

parent 6b88b3a3
No related branches found
No related tags found
No related merge requests found
...@@ -227,13 +227,13 @@ module Geocoder ...@@ -227,13 +227,13 @@ module Geocoder
def check_response_for_errors!(response) def check_response_for_errors!(response)
if response.code.to_i == 400 if response.code.to_i == 400
raise_error(Geocoder::InvalidRequest) || raise_error(Geocoder::InvalidRequest) ||
warn("Geocoding API error: 400 Invalid Request") warn("Geocoding API error: 400 Bad Request")
elsif response.code.to_i == 401 elsif response.code.to_i == 401
raise_error(Geocoder::RequestDenied) || raise_error(Geocoder::RequestDenied) ||
warn("Geocoding API error: 401 Unauthorized") warn("Geocoding API error: 401 Unauthorized")
elsif response.code.to_i == 402 elsif response.code.to_i == 402
raise_error(Geocoder::OverQueryLimitError) || raise_error(Geocoder::OverQueryLimitError) ||
warn("Geocoding API error: 402 Forbidden") warn("Geocoding API error: 402 Payment Required")
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment