ErrorDetail
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מציג פרטים על שגיאה שגרמה לאימות או לכשל פנימי.
ייצוג JSON |
{
"code": integer,
"field": string,
"message": string,
"value": string,
"fieldIndex": integer
} |
שדות |
code |
integer
קוד הסטטוס, שצריך להיות ערך enum של ErrorCode .
|
field |
string
נתיב שמוביל לשדה בגוף הבקשה. הערך הזה הוא רצף של מזהים המופרדים באמצעות נקודות שמזהים שדה של מאגר נתונים זמני של פרוטוקול. לדוגמה, 'errorDetails.field' יזהה את השדה הזה.
|
message |
string
תיאור של הסיבה לכשל בשדה. ההודעה כתובה באנגלית ויכול להיות שלא מתאימה להצגה למשתמשים.
|
value |
string
הערך שנכשל עם הבקשה.
|
fieldIndex |
integer
אם שדה הבקשה שיצר את השגיאה הזו חוזר על עצמו, הוא יכיל את האינדקס מבוסס האפס של הערך בשדה הזה, שהאימות נכשל.
|
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\u003cp\u003eThe JSON representation details errors encountered during validation or internal processes, providing specific information about the error.\u003c/p\u003e\n"],["\u003cp\u003eError details include a status code, field path, error message, problematic value, and potentially the index within a repeated field.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003efield\u003c/code\u003e attribute uses dot-separated identifiers to pinpoint the location of the error within the request body.\u003c/p\u003e\n"],["\u003cp\u003eWhile the \u003ccode\u003emessage\u003c/code\u003e offers a description of the failure, it's intended for internal use and might not be user-friendly.\u003c/p\u003e\n"]]],[],null,["# ErrorDetail\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nDetails an error that resulted in a validation or internal failure.\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------|---|\n| ``` { \"code\": integer, \"field\": string, \"message\": string, \"value\": string, \"fieldIndex\": integer } ``` |\n\n| Fields ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `integer` The status code, which should be an enum value of [ErrorCode](/my-business/reference/rest/Shared.Types/ErrorCode). |\n| `field` | `string` A path leading to a field in the request body. The value is a sequence of dot-separated identifiers that identify a protocol buffer field. For example, \"errorDetails.field\" would identify this field. |\n| `message` | `string` A description of why the field caused a failure. The message is in English and may not be suitable for display to users. |\n| `value` | `string` The value that failed the request. |\n| `fieldIndex` | `integer` If the request field that generated this error is repeated, this will contain the zero based index of the entry in that field which caused validation to fail. |"]]