Uporządkowane odpowiedzi z błędami
Aby zapewnić lepsze komunikaty i dzienniki, wprowadziliśmy usługę Key Access Control List (KACLS)
Błąd operacji zwraca ustrukturyzowaną odpowiedź JSON w treści.
Wykorzystywane są standardowe kody stanu HTTP.
Zapis JSON |
{
"code": int,
"message": string,
"details": string
}
|
Pola |
code |
int
Standardowy kod stanu HTTP
|
message |
string (UTF-8)
Zrozumiały dla człowieka komunikat o błędzie.
|
details |
string (UTF-8)
uzyskać więcej informacji o błędzie, np. zrzut stosu;
|
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-22 UTC.
[null,null,["Ostatnia aktualizacja: 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"]]