תשובות מובנות לשגיאות
כדי לאפשר הודעות ויומנים טובים יותר, ה-Key Access List Service (KACLS)
כשלים בפעולה מחזירים תשובת JSON מובנית בגוף ההודעה.
נעשה שימוש בקודי המצב הסטנדרטיים של HTTP.
ייצוג JSON |
{
"code": int,
"message": string,
"details": string
}
|
שדות |
code |
int
קוד מצב HTTP סטנדרטי
|
message |
string (UTF-8)
הודעת שגיאה שאנשים יכולים לקרוא.
|
details |
string (UTF-8)
פרטים נוספים על השגיאה, כמו דוח קריסות.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-22 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]