הסוג Status מגדיר מודל שגיאה לוגי שמתאים לסביבות תכנות שונות, כולל ממשקי API ל-REST וממשקי API ל-RPC. הוא משמש את gRPC. כל הודעה מסוג Status מכילה שלושה נתונים: קוד שגיאה, הודעת שגיאה ופרטי השגיאה.
מידע נוסף על מודל השגיאות הזה ועל אופן העבודה איתו זמין במדריך לעיצוב API.
שדות
code
int32
קוד הסטטוס, שצריך להיות ערך enum של google.rpc.Code.
message
string
הודעת שגיאה למפתחים, שצריכה להיות באנגלית. כל הודעת שגיאה שמוצגת למשתמש צריכה להיות מותאמת לשוק המקומי ונשלחת בשדה google.rpc.Status.details, או שמותאמת על ידי הלקוח.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-02-10 (שעון UTC)."],[[["The `Status` type defines a logical error model suitable for REST APIs and RPC APIs, and is used by gRPC."],["Each `Status` message contains an error code, message, and details, providing comprehensive error information."],["Developers can access further information about the error model and its usage in the API Design Guide."]]],["The `Status` message, used in REST and RPC APIs like gRPC, defines a logical error model. It comprises three data points: `code` (an integer representing the error), `message` (a developer-facing English error description), and `details` (a list of messages carrying specific error information). The `details` can contain user-facing localized error messages. The status code is a `google.rpc.Code` enum value.\n"]]