গুগল ক্লাসরুম অ্যাড-অনগুলি এখন সাধারণত বিকাশকারীদের জন্য উপলব্ধ! আরও তথ্যের জন্য
অ্যাড-অন ডকুমেন্টেশন দেখুন.
Google Classroom API ত্রুটি গঠন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Classroom API ত্রুটির তথ্য প্রদান করে যা ডেভেলপারদের সমস্যা ডিবাগ করতে এবং শেষ ব্যবহারকারীদের জন্য সহায়ক, কার্যকরী তথ্য প্রদান করতে সাহায্য করতে পারে। এই গাইড ব্যাখ্যা করে কিভাবে API থেকে প্রত্যাবর্তিত ত্রুটির তথ্য পার্স করতে হয়।
Classroom API দুটি স্তরের ত্রুটি তথ্য প্রদান করে:
- হেডারে HTTP ত্রুটি কোড।
- অতিরিক্ত বিবরণ সহ প্রতিক্রিয়া বডিতে একটি বস্তু।
ত্রুটি বার্তা গঠন
প্রতিক্রিয়া বডিতে ফিরে আসা ত্রুটিগুলি নিম্নলিখিত ক্ষেত্রগুলি অন্তর্ভুক্ত করে:
-
code
: সংখ্যাসূচক HTTP ত্রুটি কোড। উদাহরণস্বরূপ, 403
। -
message
: ত্রুটি সম্পর্কে অতিরিক্ত বিবরণ. উপলভ্য হলে, ত্রুটি বার্তাটি @
এবং একটি নির্দিষ্ট ত্রুটির ধরন দিয়ে প্রিপেন্ড করা হয়। উদাহরণস্বরূপ, @ClassroomApiDisabled
। -
status
: HTTP অনুরোধের স্থিতি। উদাহরণস্বরূপ, PERMISSION_DENIED
বা NOT_FOUND
।
যদি একটি অনুরোধ একটি ClassroomApiDisabled
ত্রুটির সাথে ব্যর্থ হয়, তাহলে প্রতিক্রিয়া হবে:
{
"error": {
"code": 403,
"message": "@ClassroomApiDisabled The user is not permitted to access the Classroom API.",
"status": "PERMISSION_DENIED"
}
}
আপনি ত্রুটির কারণ ডিবাগ করতে এবং ব্যবহারকারীদের সহায়ক তথ্য প্রদান করতে সাহায্য করার জন্য প্রতিক্রিয়া বডি ব্যবহার করতে পারেন। একই স্ট্রিং দিয়ে শুরু হওয়া অন্যান্য মানগুলিকে এড়াতে একটি নির্দিষ্ট ত্রুটি বার্তা পরীক্ষা করার সময় একটি ট্রেলিং স্পেস অন্তর্ভুক্ত করুন৷ প্রদত্ত ত্রুটি উদাহরণে, ব্যবহারকারীদের কাছে উপযুক্ত তথ্য উপস্থাপন করতে আপনি বার্তা ক্ষেত্রটি "@ClassroomApiDisabled "
দিয়ে শুরু হয়েছে কিনা তা পরীক্ষা করতে পারেন।
ক্লাসরুম API দ্বারা ফেরত দেওয়া যেতে পারে এমন কিছু ত্রুটির তথ্যের জন্য সাধারণ ত্রুটি পৃষ্ঠাটি উল্লেখ করুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Google Classroom API error structure\n\nThe Classroom API returns error information that can help developers\ndebug issues and provide helpful, actionable information to end users. This\nguide explains how to parse error information returned from the API.\n\nThe Classroom API returns two levels of error information:\n\n- HTTP error code in the header.\n- An object in the response body with additional details.\n\nError message structure\n-----------------------\n\nErrors returned in the response body include the following fields:\n\n- `code`: The numerical HTTP error code. For example, `403`.\n- `message`: Additional details about the error. When available, the error message is prepended with `@` and a specific error type. For example, `@ClassroomApiDisabled`.\n- `status`: The HTTP request status. For example, `PERMISSION_DENIED` or `NOT_FOUND`.\n\nIf a request failed with a [`ClassroomApiDisabled`](/workspace/classroom/troubleshooting/common-errors#classroom-api-disabled) error, the response would\nbe: \n\n {\n \"error\": {\n \"code\": 403,\n \"message\": \"@ClassroomApiDisabled The user is not permitted to access the Classroom API.\",\n \"status\": \"PERMISSION_DENIED\"\n }\n }\n\nYou can use the response body to help you debug the cause of the error and\nprovide helpful information to users. Include a trailing space when checking\nfor a specific error message to avoid matching other values that start with\nthe same string. In the provided error example, you can check if the message\nfield begins with `\"@ClassroomApiDisabled \"` to present appropriate information\nto users.\n\nReference the [Common errors](/workspace/classroom/troubleshooting/common-errors) page for information on some errors that\ncan be returned by the Classroom API."]]