Balasan error terstruktur
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Untuk mengizinkan pesan dan log yang lebih baik, Key Access Control List Service (KACLS)
operasi akan menampilkan balasan JSON terstruktur dalam isi.
Kode status HTTP standar digunakan.
Representasi JSON |
{
"code": int,
"message": string,
"details": string
}
|
Kolom |
code |
int
Kode status HTTP standar
|
message |
string (UTF-8)
Pesan error yang dapat dibaca manusia.
|
details |
string (UTF-8)
Detail selengkapnya tentang error, seperti pelacakan tumpukan.
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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. |"]]