Troubleshoot error codes
Stay organized with collections
Save and categorize content based on your preferences.
This page describes some common error codes that you might encounter while using
the Directory API.
503 Service unavailable
While using the nextPageToken
method to retrieve a large list of users or
devices, you might encounter this error if the request takes longer than 60
minutes. This error is due to a limitation of the Directory API.
The following is the full error response:
{
"error": {
"code": 503,
"message": "Service unavailable. Please try again",
"errors": [
{
"message": "Service unavailable. Please try again",
"domain": "global",
"reason": "backendError"
}
]
}
}
To avoid this error, you can reduce the number of devices or users by querying
with filters so that the individual operations don't take over an hour to
complete. This approach requires multiple queries. For more information, see
Search for devices.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-04 UTC.
[null,null,["Last updated 2025-08-04 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)."]]