llms.txt

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_actions contains entries, review them. Otherwise, read message and any details.
  • Retry the unchanged request only if retryable is true. If retry_after_s is set, wait that many seconds. A retry is not guaranteed to succeed.
  • message is a sentence for the case at hand; switch on code.

All codes

30 codes. Some codes appear as a resource end reason or are reserved. An HTTP status is listed where defined.

See the OpenAPI reference for the REST error schema.