Câu trả lời khi có lỗi có cấu trúc
Dịch vụ danh sách kiểm soát quyền truy cập vào chìa khoá (KACLS) để giúp cải thiện thông báo và nhật ký
lỗi thao tác sẽ trả về một phản hồi JSON có cấu trúc trong phần nội dung.
Mã trạng thái HTTP chuẩn được sử dụng.
Biểu diễn dưới dạng JSON |
{
"code": int,
"message": string,
"details": string
}
|
Trường |
code |
int
Mã trạng thái HTTP chuẩn
|
message |
string (UTF-8)
Thông báo lỗi mà con người có thể đọc được.
|
details |
string (UTF-8)
Thông tin chi tiết khác về lỗi, chẳng hạn như dấu vết ngăn xếp.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-08-22 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-08-22 UTC."],[[["KACLS operation failures now return structured JSON responses for improved debugging."],["These JSON responses include an HTTP status code, a human-readable message, and detailed error information."],["This structure facilitates easier integration with automated systems and provides developers with more context for troubleshooting."]]],["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"]]