> For the complete documentation index, see [llms.txt](https://docs.tebex.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tebex.io/developers/headless-api/error-handling.md).

# Error Handling

Tebex uses traditional HTTP response codes to indicate success or failure:

* `2xx` codes indicate success
* `4xx` codes indicate an error with the information provided (bad request, no permissions)
* `5xx` codes indicate an error with Tebex servers

An [RFC-9457](https://www.rfc-editor.org/info/rfc9457/) compliant problem details object is returned containing details about the failure:

```json
{
    "type": "uri://path/to/problem/type",
    "title": "You do not have enough funds",
    "detail": "Your current funds are 30, but the cart is 50",
    "instance": "/account/token/baskets/tbx-abc123"
}
```
