ขณะนี้
เส้นทาง 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."]]],[]]