Routes Preferred API is currently available only to select customers.
Contact sales to learn more.
Handle request errors
Stay organized with collections
Save and categorize content based on your preferences.
The Routes Preferred 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-01-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-29 UTC."],[[["The Routes Preferred API utilizes error messages within its responses to indicate issues with method calls."],["These error messages provide specific details, including an error code, a descriptive message, and a status indicator, to help identify the cause of the error."],["Common errors include missing API keys, resulting in a \"PERMISSION_DENIED\" status, or omitting required parameters like \"origin,\" leading to an \"INVALID_ARGUMENT\" status."],["For a comprehensive understanding of errors and their handling within Google Cloud APIs, refer to the provided documentation on Errors."]]],[]]