요청 오류 처리
Routes 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"
}
}
오류 및 오류 처리에 관한 자세한 내용은 오류를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-02-06(UTC)
[null,null,["최종 업데이트: 2025-02-06(UTC)"],[[["The Routes API provides error messages within its responses to indicate issues with the request."],["Errors are returned as JSON objects containing an `error` field with details about the issue, such as a code, message, and status."],["Missing API keys result in a `PERMISSION_DENIED` error with a 403 code."],["Omitting required parameters like `origin` leads to an `INVALID_ARGUMENT` error with a 400 code."],["Further details on errors and their handling can be found in the Google Cloud API Design Guide on Errors."]]],[]]