Package google.rpc
الحالة
يحدد النوع Status
نموذج خطأ منطقيًا مناسبًا لبيئات البرمجة المختلفة، بما في ذلك واجهات برمجة تطبيقات REST وواجهات RPC API. وتستخدمه gRPC. تحتوي كل رسالة في Status
على ثلاثة أجزاء من البيانات: رمز الخطأ، ورسالة الخطأ، وتفاصيل الخطأ.
يمكنك الاطّلاع على المزيد من المعلومات حول نموذج الخطأ هذا وكيفية استخدامه في دليل تصميم واجهة برمجة التطبيقات.
الحقول |
code |
int32
رمز الحالة الذي يجب أن يكون قيمة تعداد google.rpc.Code .
|
message |
string
تظهر رسالة خطأ لمطوّر البرامج باللغة الإنجليزية. يجب ترجمة أي رسالة خطأ مواجهة للمستخدم وإرسالها في الحقل google.rpc.Status.details ، أو ترجمتها من قِبل البرنامج.
|
details[] |
Any
قائمة بالرسائل التي تحتوي على تفاصيل الخطأ. هناك مجموعة شائعة من أنواع الرسائل التي يمكن استخدامها في واجهات برمجة التطبيقات.
|
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2022-09-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2022-09-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `Status` type defines a logical error model used by gRPC for REST and RPC APIs, containing an error code, message, and details."],["Each `Status` message includes a status code, a developer-facing error message, and a list of error details carried in messages."],["Developers can learn more about this error model in the API Design Guide, and user-facing messages should be localized."]]],["The `Status` message, used in environments like REST and RPC APIs, defines a logical error model. It conveys errors through three data points: `code` (an integer representing the error type), `message` (a developer-facing English error description), and `details[]` (a list of messages providing further error information). User-facing error messages should be localized and sent in the details field, or localized by the client. This status is used by gRPC.\n"]]