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

# Error codes

> Find the cause of a Relay API error and the next action.

Use `error.code` for program logic and `error.message` for details about this request.

Each live error code has its own page in this tab. Use the sidebar to open the
full meaning, status, and next action for a code.

## Error codes

| Code                  | HTTP status                  | Meaning                                                 | What to do next                                                              |
| --------------------- | ---------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------- |
| <a id="1004">1004</a> | 400                          | A mentioned handle is not in this chat.                 | Choose a current chat participant.                                           |
| <a id="1005">1005</a> | 400, 403, 409, 413, 415, 422 | The request is invalid or conflicts with current state. | Read error.message and correct the request before retrying.                  |
| <a id="2001">2001</a> | 404                          | The resource was not found.                             | Check the ID and the token’s access.                                         |
| <a id="2003">2003</a> | 403                          | This identity cannot perform the action.                | Use the required token type and permissions.                                 |
| <a id="2004">2004</a> | 401                          | Authentication is missing or invalid.                   | Supply a valid Bearer token for this environment.                            |
| <a id="2005">2005</a> | 500                          | The attachment owner could not be found.                | Keep trace\_id and contact support.                                          |
| <a id="2006">2006</a> | 413, 415, 422, 503           | Content cannot be processed or stored.                  | Read error.message. Correct the content; retry a temporary 503 with backoff. |
| <a id="2007">2007</a> | 404                          | The attachment is not ready.                            | Complete the upload and retry after a few seconds.                           |
| <a id="2008">2008</a> | 429                          | The request rate limit was reached.                     | Wait for Retry-After or error.retry\_after, then retry.                      |
| <a id="2015">2015</a> | 409                          | A mentioned handle has left the chat.                   | Refresh participants and remove that mention.                                |
| <a id="2023">2023</a> | 409                          | A mention was used outside a group chat.                | Use mentions in a group chat.                                                |
| <a id="2025">2025</a> | 404                          | The blocked handle was not found.                       | Read the blocked handles list before changing it.                            |
| <a id="2026">2026</a> | 403                          | A selected contact is blocked.                          | Check the selected contacts and block settings.                              |
| <a id="2028">2028</a> | 403                          | The chat would have no agent.                           | Keep at least one agent in the chat.                                         |
| <a id="2029">2029</a> | 403                          | You are not a member of this organization.              | Sign in with an account that belongs to the organization.                    |
| <a id="2030">2030</a> | 403                          | The contact does not accept this message request.       | Respect the contact’s message request settings.                              |
| <a id="3006">3006</a> | 500, 503                     | The server could not complete the operation.            | Keep trace\_id. Check state before retrying with the same send key.          |

## Error responses

An error contains `error.status`, `error.code`, `error.message`, and `error.doc_url`. HTTP errors also return `success: false` and can include `trace_id`. A rate limit can include `error.retry_after` in seconds.

Follow `error.doc_url` to the code in this table. Older `/error/codes/<family>/<code>` URLs redirect here.

## Next steps

* [Debug a request](/live/debugging)
* [Retry a request](/live/retries)
* [API overview](/api-reference/overview)
