Status
Status
टाइप, लॉजिकल एरर मॉडल के बारे में बताता है, जो अलग-अलग प्रोग्रामिंग एनवायरमेंट के लिए सही होता है. इनमें REST API और RPC एपीआई शामिल हैं. इसका इस्तेमाल gRPC करता है. हर Status
मैसेज में डेटा के तीन हिस्से होते हैं: गड़बड़ी का कोड, गड़बड़ी का मैसेज, और गड़बड़ी की जानकारी.
आपको एपीआई डिज़ाइन गाइड में, गड़बड़ी वाले इस मॉडल और इसके साथ काम करने के तरीके के बारे में ज़्यादा जानकारी मिल सकती है.
JSON के काेड में दिखाना |
{
"code": integer,
"message": string,
"details": [
{
"@type": string,
field1: ...,
...
}
]
} |
फ़ील्ड |
code |
integer
स्टेटस कोड, जो google.rpc.Code की enum वैल्यू होनी चाहिए.
|
message |
string
डेवलपर को भेजा जाने वाला गड़बड़ी का मैसेज, जो अंग्रेज़ी में होना चाहिए. उपयोगकर्ता को दिखने वाली गड़बड़ी के किसी भी मैसेज को स्थानीय भाषा में लिखा जाना चाहिए और google.rpc.Status.details फ़ील्ड में भेजा जाना चाहिए या क्लाइंट की ओर से स्थानीय भाषा में भेजा जाना चाहिए.
|
details[] |
object
उन मैसेज की सूची जिनमें गड़बड़ी की जानकारी होती है. एपीआई के इस्तेमाल के लिए, मैसेज के टाइप का एक सामान्य सेट मौजूद है. ऐसा ऑब्जेक्ट जिसमें आर्बिट्रेरी टाइप के फ़ील्ड शामिल होते हैं. अतिरिक्त फ़ील्ड "@type" में, टाइप की पहचान करने वाला यूआरआई होता है. उदाहरण: { "id": 1234, "@type": "types.example.com/standard/id" } .
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-09-10 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-09-10 (UTC) को अपडेट किया गया."],[[["The `Status` type is a standard error model used by gRPC and REST APIs to represent errors with a code, message, and optional details."],["Each `Status` object includes an integer `code` from `google.rpc.Code`, a developer-facing `message`, and an array of `details` for further information."],["The `details` field allows for structured error data using custom types identified by a `@type` URI."]]],["The `Status` type represents a logical error model with three data components: `code`, `message`, and `details`. `code` is an integer status code, `message` is a developer-facing English error message, and `details` is a list of objects providing further error information, each specifying its type via `\"@type\"`. The JSON representation uses these fields to structure error messages. User-facing messages should be localized.\n"]]