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-12 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","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"]],["आखिरी बार 2024-09-12 (UTC) को अपडेट किया गया."],[[["The `Status` type is a structured way to represent errors in various programming environments, including REST APIs and RPC APIs, and is used by gRPC."],["Each `Status` message consists of three components: an integer error code (`code`), a developer-facing error message in English (`message`), and an optional list of objects (`details`) containing further error specifics."],["`Status` utilizes a common error model that is further detailed in the Google API Design Guide for developers seeking more information and practical implementation advice."]]],["The `Status` type, used in APIs like gRPC, represents errors with three components: `code` (an integer from `google.rpc.Code`), `message` (a developer-facing English string), and `details` (a list of objects with error specifics). `details` contain objects with an `@type` field to specify the object type, and the `message` is intended for developer use, not directly for the end user. User-facing error information is localized and sent in `details`.\n"]]