Error response format
Errors use this structure:Common error codes
Handle 409 conflicts
409 Conflict uses error code CONFLICT, but it can have more than one cause.
- Start: the instance is terminating or terminated, or the account does not have enough credit.
- Stop: the instance is terminating or terminated.
- Terminate: the instance is already terminated.
1
Fetch the current state
Call
GET /instances/{id}.2
Check what blocked the action
Use the instance state to identify lifecycle conflicts. For start requests, also check whether the account has enough credit.
3
Retry only when the cause is resolved
Wait for a valid state transition or add credit as needed before sending the action again.
Handle rate limits
Rate limits apply per source IP address rather than per API key. Clients that share an egress IP also share the same request budget. A429 Too Many Requests response includes a Retry-After header. Wait that many seconds before retrying.
429 dynamically.
Handle server errors
A500 response uses the generic message:
error.code for program logic and keep request_id for troubleshooting.
For temporary server errors, retry after a short delay. If the problem continues, contact Support with the request_id.
Handle temporary capacity errors
A start request can return503 Service Unavailable when no host currently has enough free capacity for the instance’s preset. The body uses INTERNAL_ERROR rather than a separate capacity error code.
Retry with backoff, or choose a compatible preset in another region. This is a temporary capacity condition rather than a problem with the request itself.
Retry safely
Before retrying a destructive action such as terminate, fetch the instance state and confirm the action is still needed.
What to include when asking for help
Include:- The endpoint and HTTP method
- The HTTP status
error.codeerror.request_id- A redacted request if useful