Google Classroom API से जुड़ी गड़बड़ी का स्ट्रक्चर
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Classroom API, गड़बड़ी की जानकारी दिखाता है. इससे डेवलपर को समस्याओं को डीबग करने में मदद मिलती है. साथ ही, असली उपयोगकर्ताओं को काम की और कार्रवाई करने के लिए ज़रूरी जानकारी मिलती है. इस गाइड में, एपीआई से मिली गड़बड़ी की जानकारी को पार्स करने का तरीका बताया गया है.
Classroom API, गड़बड़ी की जानकारी दो लेवल पर दिखाता है:
हेडर में एचटीटीपी गड़बड़ी कोड.
रिस्पॉन्स बॉडी में मौजूद एक ऑब्जेक्ट, जिसमें ज़्यादा जानकारी होती है.
गड़बड़ी के मैसेज का स्ट्रक्चर
रिस्पॉन्स बॉडी में दिखने वाली गड़बड़ियों में ये फ़ील्ड शामिल होते हैं:
code: एचटीटीपी गड़बड़ी का अंकों वाला कोड. उदाहरण के लिए, 403.
message: गड़बड़ी के बारे में ज़्यादा जानकारी. अगर गड़बड़ी का मैसेज उपलब्ध है, तो उसमें @ और गड़बड़ी का टाइप पहले से जुड़ा होता है. उदाहरण के लिए,
@ClassroomApiDisabled.
status: एचटीटीपी अनुरोध का स्टेटस. उदाहरण के लिए, PERMISSION_DENIED या
NOT_FOUND.
अगर कोई अनुरोध ClassroomApiDisabled गड़बड़ी की वजह से पूरा नहीं हो पाता है, तो जवाब यह होगा:
{"error":{"code":403,"message":"@ClassroomApiDisabled The user is not permitted to access the Classroom API.","status":"PERMISSION_DENIED"}}
गड़बड़ी की वजह को डीबग करने और उपयोगकर्ताओं को काम की जानकारी देने के लिए, रिस्पॉन्स बॉडी का इस्तेमाल किया जा सकता है. किसी खास गड़बड़ी के मैसेज की जांच करते समय, आखिर में स्पेस शामिल करें. इससे, एक ही स्ट्रिंग से शुरू होने वाली अन्य वैल्यू से मैच होने से बचा जा सकता है. गड़बड़ी के दिए गए उदाहरण में, यह देखा जा सकता है कि उपयोगकर्ताओं को सही जानकारी देने के लिए, मैसेज फ़ील्ड "@ClassroomApiDisabled " से शुरू होता है या नहीं.
Classroom API से मिलने वाली कुछ गड़बड़ियों के बारे में जानने के लिए, आम गड़बड़ियां पेज पर जाएं.
[[["समझने में आसान है","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-01-30 (UTC) को अपडेट किया गया."],[[["The Classroom API provides error information via HTTP error codes in the header and detailed error objects in the response body."],["Error objects in the response body contain a numerical `code`, a detailed `message` potentially including a specific error type prepended with `@`, and an HTTP request `status`."],["Developers can use the error `message` field, particularly by checking for specific prefixes like `@ClassroomApiDisabled `, to debug issues and inform users."],["The error message structure provided by the API allows for the extraction of the HTTP code, the reason behind the error and its status."],["Refer to the Common Errors page to see a detailed list of possible error messages and the actions that can be taken in response to them."]]],[]]