> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sanfoundation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and retries

> Handle validation failures, exhausted quota, and temporary search failures.

Use `error.code`; optional `param` identifies the parameter at fault:

```json theme={null}
{
  "error": {
    "code": "invalid_parameter",
    "message": "Unknown parameter `q`.",
    "param": "q"
  }
}
```

| HTTP status | Code | What to do |
| - | - | - |
| `400` | `missing_parameter` | Supply the parameter. |
| `400` | `invalid_parameter` | Correct or remove the parameter. |
| `401` | `unauthorized` | Check your authentication header. |
| `404` | `not_found` | Check endpoint/ID or quote/status availability. |
| `429` | `quota_exceeded` | Check [quota and reset time](https://docs.sanfoundation.com/api-reference/account.md). |
| `503` | `unavailable` | Retry with a delay. |
| `500` | `internal_error` | Retry cautiously; report persistent failures. |

Unknown parameters are rejected. Correct `400`, `401`, `404`, and quota errors before retrying.

For temporary failures, use exponential backoff with jitter, timeouts, and a retry limit. A timeout does not cancel server work: completed requests can count toward quota, and retries are new requests.

Authentication, validation, and unsuccessful search dispatches consume no quota. Empty successful searches and completed quote/status lookups returning `404` consume one request.

`rate_limited` (`429`) is reserved. Expired booking handoffs return `410 expired`; request fresh booking options.

Contact [support](mailto:joe@sanfoundation.com) with the endpoint, error code, time, and available request ID. Remove API keys from logs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.