Application
err:unkey:application:unexpected_error
An unhandled or unexpected error occurred
Example
What Happened?
This error occurs when the Unkey system encounters an internal error that wasn’t anticipated or couldn’t be handled gracefully. This is generally not caused by anything you did wrong in your request, but rather indicates an issue within Unkey’s systems.
Possible causes of this error:
- Temporary infrastructure issues
- Database connectivity problems
- Bugs in the Unkey service
- Resource constraints or timeouts
- Unexpected edge cases not handled by the application logic
Here’s an example of a request that might trigger this error if there’s an internal issue:
How To Fix
Since this is an internal error, there’s usually little you can do to directly fix it, but you can try the following:
- Retry the request: Many unexpected errors are temporary and will resolve on a retry
- Check Unkey status: Visit the Unkey status page to see if there are any ongoing service issues
- Contact support: If the error persists, contact Unkey support with your request ID
- Implement retry logic: For critical operations, implement exponential backoff retry logic in your code
Here’s an example of implementing retry logic with exponential backoff:
Important Notes
- Always include the
requestId
when contacting support about this error - This error may indicate a bug in Unkey’s systems that needs to be fixed
- Unlike most other errors, this one usually can’t be resolved by changing your request
- If you encounter this error consistently with a specific API call, there may be an edge case that Unkey’s team needs to address
Related Errors
- err:unkey:application:service_unavailable - When a service is temporarily unavailable