排解錯誤代碼
本頁面說明使用 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-01-27 (世界標準時間)。
[null,null,["上次更新時間:2025-01-27 (世界標準時間)。"],[[["This page provides information about common Directory API error codes."],["The `503 Service unavailable` error can occur when retrieving large lists of users or devices if the request exceeds 60 minutes."],["To prevent this error, use filters to reduce the number of users or devices in each query, potentially requiring multiple queries."]]],[]]