Routes Preferred API در حال حاضر فقط برای مشتریان منتخب در دسترس است. برای کسب اطلاعات بیشتر
با واحد فروش تماس بگیرید.
رسیدگی به خطاهای درخواست
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Routes Preferred 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 مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-04-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-04-24 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]