แก้ปัญหารหัสข้อผิดพลาด
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หน้านี้อธิบายรหัสข้อผิดพลาดที่พบบ่อยซึ่งคุณอาจพบขณะใช้ 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"
}
]
}
}
หากต้องการหลีกเลี่ยงข้อผิดพลาดนี้ คุณสามารถลดจำนวนอุปกรณ์หรือผู้ใช้ได้โดยทำการค้นหาด้วยตัวกรองเพื่อให้การดำเนินการแต่ละรายการใช้เวลาไม่เกิน 1 ชั่วโมง วิธีการนี้ต้องใช้การค้นหาหลายรายการ โปรดดูข้อมูลเพิ่มเติมที่หัวข้อค้นหาอุปกรณ์
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-03-25 UTC
[null,null,["อัปเดตล่าสุด 2025-03-25 UTC"],[],[],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)."]]