অনুরোধের ত্রুটিগুলি পরিচালনা করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
রুট পছন্দের API একটি পদ্ধতি কলের প্রতিক্রিয়ার অংশ হিসাবে ত্রুটি বার্তা প্রদান করে। উদাহরণস্বরূপ, যদি আপনি অনুরোধ থেকে API কী বাদ দেন, পদ্ধতিটি ফিরে আসে:
{
"error": {
"code": 403,
"message": "The request is missing a valid API key.",
"status": "PERMISSION_DENIED"
}
}
যদি আপনি একটি প্রয়োজনীয় বডি প্যারামিটার বাদ দেন, যেমন origin
, পদ্ধতিটি ফিরে আসে:
{
"error": {
"code": 400,
"message": "Origin and destination must be set.",
"status": "INVALID_ARGUMENT"
}
}
ত্রুটি এবং ত্রুটি পরিচালনা সম্পর্কে আরও তথ্যের জন্য, ত্রুটিগুলি দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-04-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-04-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Routes Preferred API utilizes error messages within its responses to indicate issues with method calls.\u003c/p\u003e\n"],["\u003cp\u003eThese error messages provide specific details, including an error code, a descriptive message, and a status indicator, to help identify the cause of the error.\u003c/p\u003e\n"],["\u003cp\u003eCommon errors include missing API keys, resulting in a "PERMISSION_DENIED" status, or omitting required parameters like "origin," leading to an "INVALID_ARGUMENT" status.\u003c/p\u003e\n"],["\u003cp\u003eFor a comprehensive understanding of errors and their handling within Google Cloud APIs, refer to the provided documentation on Errors.\u003c/p\u003e\n"]]],[],null,["# Handle request errors\n\nThe Routes Preferred API returns error messages as part of the\nresponse to a method call. For example, if you omit the API key from the\nrequest, the method returns: \n\n```json\n{\n \"error\": {\n \"code\": 403,\n \"message\": \"The request is missing a valid API key.\",\n \"status\": \"PERMISSION_DENIED\"\n }\n}\n```\n\nIf you omit a required body parameter, such as `origin`, the method\nreturns: \n\n```json\n{\n \"error\": {\n \"code\": 400,\n \"message\": \"Origin and destination must be set.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n```\n\nFor more information on errors and error handling, see\n[Errors](https://cloud.google.com/apis/design/errors)."]]