An error response does not always mean the API is unavailable. Many errors mean the request needs a different token, parameter, resource ID, or retry strategy. Check the endpoint reference for errors documented on a specific endpoint.
Error response format
Error responses use a standard JSON format. A typical error response looks like this:Error fields
Common status codes
Not every endpoint returns every status code. Check the API reference for the errors documented for a specific endpoint.
Handle validation errors
A400 Bad Request usually means the API understood the request, but one or more values were not valid.
For example, a GET /instances request may fail if status does not match one of the supported filter values:
- Check the exact parameter name.
- Check the value format.
- Check allowed enum values.
- Check UUID and date-time formatting.
- Remove optional parameters until the request works, then add them back one by one.
Handle authentication errors
A401 Unauthorized response means the request did not include a valid token.
Check that the request includes the Authorization header:
- The header is missing.
Beareris misspelled.- The token was copied with extra spaces.
- The token is expired, revoked, or invalid.
- The request is being sent from a tool that strips headers.
Handle not found errors
A404 Not Found response means the requested resource could not be found.
For API users, this can mean one of two things:
- The resource does not exist.
- The resource exists, but your token cannot access it.
GET /instances/{id} may return 404 if the instance ID is wrong, or if the instance is not visible to the user or organization linked to the token.
When you see a 404:
- Check the resource ID.
- Confirm you are using the right environment and base URL.
- Confirm the token can access the expected account or organization.
Handle conflict errors
A409 Conflict means the request cannot be completed because the resource is not in the right state for that action. This is most relevant for actions that change resources, such as starting or terminating an instance.
For example, an action may fail if the resource is already changing state, already terminated, or not ready for the requested operation.
When you see a 409:
1
Fetch the latest resource state
Call the relevant
GET endpoint again and check the current status.2
Confirm the action is still valid
Make sure the resource can still accept the action you want to run.
3
Wait if the resource is changing state
If the resource is starting, stopping, or terminating, wait before trying again.
4
Retry only when safe
Retry once you know the action is still valid and won’t cause an unwanted change.
Handle rate limits
A429 Too Many Requests response means your client sent too many requests in a short time.
If the response includes a Retry-After header, wait that many seconds before sending another request.
Example response header:
Retry safely
Some requests are safer to retry than others.Be careful retrying destructive actions. Before retrying a terminate request, fetch the resource state and confirm you still want to continue.
Build simple retry behavior
A safe retry flow looks like this:1
Check the status code
Use the status code to decide whether the request can be retried.
2
Fix request errors first
For
400, 401, and 403, change the request or access setup before retrying.3
Respect rate limit
For
429, wait for the Retry-After value when it is included.4
Pause before retrying server errors
For
500 or higher, wait before retrying instead of sending repeated requests immediately.5
Check resource state after actions
For actions that change resources, fetch the resource again before deciding whether another request is needed. For instances, use
GET /instances/{id}.What to include when asking for help
If you need help with an API error, include:- The HTTP status code
- The response
message - The response
timestamp - The response
path - Whether the request worked before
- What changed before the error started