Handle request errors
Stay organized with collections
Save and categorize content based on your preferences.
European Economic Area (EEA) developers
The Routes API returns error messages as part of the
response to a method call. For example, if you omit the API key from the
request, the method returns:
{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"status": "PERMISSION_DENIED"
}
}
If you omit a required body parameter, such as origin
, the method
returns:
{
"error": {
"code": 400,
"message": "Origin and destination must be set.",
"status": "INVALID_ARGUMENT"
}
}
For more information on errors and error handling, see
Errors.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-12 UTC.
[null,null,["Last updated 2025-09-12 UTC."],[],[],null,[]]