排解錯誤代碼
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面說明使用 Directory API 時可能遇到的常見錯誤代碼。
503 Service unavailable
使用 nextPageToken
方法擷取大量使用者或裝置清單時,如果要求超過 60 分鐘,就可能會發生這個錯誤。這項錯誤是因為 Directory API 的限制。
以下是完整的錯誤回應:
{
"error": {
"code": 503,
"message": "Service unavailable. Please try again",
"errors": [
{
"message": "Service unavailable. Please try again",
"domain": "global",
"reason": "backendError"
}
]
}
}
為避免發生這個錯誤,您可以使用篩選器查詢,減少裝置或使用者數量,讓個別作業不會花費超過一小時才能完成。這種做法需要多次查詢。詳情請參閱「搜尋裝置」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-25 (世界標準時間)。
[null,null,["上次更新時間:2025-03-25 (世界標準時間)。"],[],[],null,["# Troubleshoot error codes\n\nThis page describes some common error codes that you might encounter while using\nthe Directory API.\n\n`503 Service unavailable`\n-------------------------\n\nWhile using the `nextPageToken` method to retrieve a large list of users or\ndevices, you might encounter this error if the request takes longer than 60\nminutes. This error is due to a limitation of the Directory API.\n\nThe following is the full error response: \n\n```\n{\n \"error\": {\n \"code\": 503,\n \"message\": \"Service unavailable. Please try again\",\n \"errors\": [\n {\n \"message\": \"Service unavailable. Please try again\",\n \"domain\": \"global\",\n \"reason\": \"backendError\"\n }\n ]\n }\n}\n```\n\nTo avoid this error, you can reduce the number of devices or users by querying\nwith filters so that the individual operations don't take over an hour to\ncomplete. This approach requires multiple queries. For more information, see\n[Search for devices](/workspace/admin/directory/v1/guides/search-devices)."]]