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

# Errors

> Standard HTTP status codes, and a machine-readable code to branch on.

```json Key or request refused theme={"system"}
{ "error": "invalid_api_key" }
```

```json Refused by the assistant theme={"system"}
{
  "detail": { "code": "partition_keys_mismatch", "expected": ["customer_id"] }
}
```

`2xx` means success, `4xx` a problem with the request, `5xx` a problem on Concatflow's side.

Errors come in one of two shapes. Read `error` first, then `detail.code`. `@concatflow/node` does it for you and throws a [`ConcatflowError`](https://docs.concatflow.com/reference/node/errors) with the result in `code`.

| Status | Code | Meaning |
| - | - | - |
| 400 | `invalid_body` | Malformed body, an ID that is not a UUID, or no `partition`. |
| 401 | `invalid_api_key` | Missing, wrong or revoked key. Checked first. |
| 403 | `partition_keys_mismatch` | The partition keys differ from the assistant's isolation. `detail.expected` lists them. |
| 404 | | Unknown assistant, or one from another workspace. |
| 409 | `not_published`, `door_closed`, `isolation_unsigned` | The assistant is not ready for the per-user door. |
| 422 | `bad_partition` | The `partition` query string cannot be read. |
| 422 | | A partition key over 63 characters, or a value over 200. `detail` is a list. |
| 502 | `backend_unreachable` | Concatflow could not reach its API. Retry. |

Only `502` is worth retrying as is. Every other error needs a change: to the request, or to the assistant in the dashboard.


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