การตอบกลับข้อผิดพลาดที่มีโครงสร้าง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Key Access Control List Service (KACLS) ช่วยให้ข้อความและบันทึกมีประสิทธิภาพยิ่งขึ้น
การดำเนินการล้มเหลวจะแสดงการตอบกลับ JSON ที่มีโครงสร้างในส่วนเนื้อหา
ระบบจะใช้รหัสสถานะ HTTP มาตรฐาน
การแสดง JSON |
{
"code": int,
"message": string,
"details": string
}
|
ช่อง |
code |
int
รหัสสถานะ HTTP มาตรฐาน
|
message |
string (UTF-8)
ข้อความแสดงข้อผิดพลาดที่มนุษย์อ่านได้
|
details |
string (UTF-8)
รายละเอียดเพิ่มเติมเกี่ยวกับข้อผิดพลาด เช่น สแต็กเทรซ
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eKACLS operation failures now return structured JSON responses for improved debugging.\u003c/p\u003e\n"],["\u003cp\u003eThese JSON responses include an HTTP status code, a human-readable message, and detailed error information.\u003c/p\u003e\n"],["\u003cp\u003eThis structure facilitates easier integration with automated systems and provides developers with more context for troubleshooting.\u003c/p\u003e\n"]]],["KACLS operation failures now return a structured JSON response in the body, using standard HTTP status codes. The JSON format includes three fields: `code` (an integer representing the HTTP status), `message` (a human-readable error string), and `details` (a string providing further information like a stack trace). This structured format improves the quality of error messages and logs.\n"],null,["# Structured error replies\n\nTo allow better messages and logs, the Key Access Control List Service (KACLS)\noperation failures returns a structured JSON reply in the body.\nThe standard HTTP status codes are used.\n\n| JSON representation ||\n|---------------------------------------------------------------|---|\n| ``` { \"code\": int, \"message\": string, \"details\": string } ``` |\n\n| Fields ||\n|-----------|-----------------------------------------------------------------------|\n| `code` | `int` Standard HTTP status code |\n| `message` | `string (UTF-8)` A human readable error message. |\n| `details` | `string (UTF-8)` More details about the error, such as a stack trace. |"]]