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-05 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-09-05 (UTC) को अपडेट किया गया."],[[["The `Status` type is a structured approach to define errors in APIs that's suitable for various programming environments, including REST and RPC."],["Each `Status` message includes an error code, a message intended for developers, and optional details that can hold localized or additional information."],["These error details are provided as a list of objects with a designated type specified using the `@type` field for clarity and structured data representation."]]],["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, while user-facing messages should be localized and sent in `details`. `details` is a list of objects carrying specific error information, with each object including a \"@type\" field for type identification. This model is used in REST and RPC APIs, and is also used by gRPC.\n"]]