অনুরোধের ত্রুটিগুলি পরিচালনা করুন
Routes 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-02-05 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-02-05 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["The Routes API provides error messages within its responses to indicate issues with the request."],["Errors are returned as JSON objects containing an `error` field with details about the issue, such as a code, message, and status."],["Missing API keys result in a `PERMISSION_DENIED` error with a 403 code."],["Omitting required parameters like `origin` leads to an `INVALID_ARGUMENT` error with a 400 code."],["Further details on errors and their handling can be found in the Google Cloud API Design Guide on Errors."]]],[]]