Application
err:unkey:application:service_unavailable
A service is temporarily unavailable
Example
What Happened?
This error occurs when a component of the Unkey platform is temporarily unavailable or unable to process your request. Unlike an unexpected error, this is a known state where the system has detected that it cannot currently provide the requested service.
Possible causes of this error:
- Scheduled maintenance
- High load or capacity issues
- Dependent service outages
- Regional infrastructure problems
- Database overload or maintenance
Here’s an example of a request that might receive this error during a service disruption:
How To Fix
Since this is a temporary service issue, the best approach is to wait and retry. Here are some strategies:
- Implement retry logic: Add automatic retries with exponential backoff to your code
- Check service status: Visit the Unkey status page for updates on service availability
- Try alternate regions: If Unkey offers region-specific endpoints, try an alternate region
- Wait and retry manually: If it’s a one-time operation, simply try again later
Here’s an example of a robust retry strategy:
Important Notes
- This error is temporary, and the service will typically recover automatically
- For critical applications, implement circuit breakers to prevent cascading failures
- If the service remains unavailable for an extended period, check Unkey’s status page or contact support
- Include the
requestId
from the error response when contacting support
Related Errors
- err:unkey:application:unexpected_error - When an unhandled error occurs
- err:unkey:authorization:workspace_disabled - When the workspace is disabled (a different type of unavailability)