code in your program: it is stable. message is in plain words, for people, and may change.
A call that fails isn’t counted against your monthly quota. Only answers count.
Every code
See Quotas and limits for the limits behind
429 and 503.
Ambiguous places
Whenq is a place name that matches more than one place, the error lists the places we know by that name. Each choice has its name, its council and a point as [longitude, latitude]. The places in this example are illustrative.
name as q, or its point as lat and lng (the point’s second number is lat):
Example bodies
401 invalid_key
401 invalid_key
403 key_revoked
403 key_revoked
404 not_found
404 not_found
405 method_not_allowed
405 method_not_allowed
422 outside_england
422 outside_england
422 bad_request
422 bad_request
429 quota_exceeded
429 quota_exceeded
429 rate_limited
429 rate_limited
503 too_slow
503 too_slow
Handling errors
1
Check the status
2xx is an answer. Anything else has an error body.2
Branch on the code
Fix and resend
bad_request, not_found and ambiguous. Wait and retry rate_limited. Stop on invalid_key, key_revoked and quota_exceeded, and tell someone.3
Show the message if you must
message is written for people, so it is safe to log or show.