現在、
Routes Preferred API は一部のお客様のみご利用いただけます。詳しくは、
営業担当者までお問い合わせください。
リクエスト エラーを処理する
Routes Preferred API は、メソッド呼び出しのレスポンスの一部としてエラー メッセージを返します。たとえば、リクエストから API キーを省略すると、メソッドは次を返します。
{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"status": "PERMISSION_DENIED"
}
}
必須の本文パラメータ(origin
など)を省略すると、メソッドは次を返します。
{
"error": {
"code": 400,
"message": "Origin and destination must be set.",
"status": "INVALID_ARGUMENT"
}
}
エラーとエラー処理の詳細については、エラーをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-23 UTC。
[null,null,["最終更新日 2024-11-23 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."]]],[]]