Error codes
X9 application errors include a code and message. Transport and protocol errors can have a different format. Some application errors include extra fields such as details.
Example application error
{
"ok": false,
"error": {
"code": "OFFER_GONE",
"message": "offer not available now",
"retryable": false,
"retry_after_s": null,
"next_actions": [
{
"tool": "search_offers",
"why": "pick a live offer"
}
],
"docs": "https://x9si.com/errors/OFFER_GONE"
}
}
- If
next_actionscontains entries, review them. Otherwise, readmessageand anydetails. - Retry the unchanged request only if
retryableis true. Ifretry_after_sis set, wait that many seconds. A retry is not guaranteed to succeed. messageis a sentence for the case at hand; switch oncode.
All codes
30 codes. Some codes appear as a resource end reason or are reserved. An HTTP status is listed where defined.
| Code | HTTP status |
|---|---|
BENCH_TOO_SOON | 429 |
BOND_TOO_LOW | 409 |
BOOT_TIMEOUT | Not listed |
BUDGET_EXCEEDED | 402 |
CAP_GPU_CLASS | 403 |
CAP_HOURLY_BURN | 429 |
DISK_OVER_QUOTE | 409 |
HOST_FAILED | 503, 504 |
IDEMPOTENCY_CONFLICT | 409 |
IMAGE_PULL_FAILED | Not listed |
INSUFFICIENT_FUNDS | 402, 409 |
INTERNAL | 500, 502, 503 |
INVALID_ARGS | 400, 408, 409, 413 |
KYC_REQUIRED | 403 |
MACHINE_BUSY | 409 |
NOT_AVAILABLE_YET | 403, 501, 503 |
NOT_FOUND | 404 |
NO_CAPACITY | 409 |
OFFER_GONE | 409 |
PAYMENT_REQUIRED | 402 |
PRICE_MOVED | 409 |
PROTO_UNSUPPORTED | 426 |
PROVIDER_UNAVAILABLE | 503 |
QUOTE_EXPIRED | 409 |
RATE_LIMITED | 429 |
REGION_BLOCKED | 451 |
RESOURCE_NOT_RUNNING | 409 |
SCOPE_DENIED | 403 |
SELF_TEST_FAILED | 409 |
UNAUTHORIZED | 400, 401 |
See the OpenAPI reference for the REST error schema.