Risposte a errori strutturati
Per consentire messaggi e log migliori, il Key Access Control List Service (KACLS)
di operazioni non riuscite restituisce una risposta JSON strutturata nel corpo.
Vengono utilizzati i codici di stato HTTP standard.
Rappresentazione JSON |
{
"code": int,
"message": string,
"details": string
}
|
Campi |
code |
int
Codice di stato HTTP standard
|
message |
string (UTF-8)
Un messaggio di errore leggibile.
|
details |
string (UTF-8)
Ulteriori dettagli sull'errore, ad esempio un'analisi dello stack.
|
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-08-22 UTC.
[null,null,["Ultimo aggiornamento 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"]]