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

# Error codes

> HTTP status codes returned by Connector API

| HTTP  | Description                                                                                                       |
| ----- | ----------------------------------------------------------------------------------------------------------------- |
| `400` | Missing `Client-Id`; session not initialized; unknown entity; invalid `date_from`; no entities for `start-upload` |
| `401` | Invalid or missing token (`User not authenticated`)                                                               |
| `403` | `upload_uuid` does not match active session (`Invalid upload UUID`); disallowed IP                                |
| `404` | Session record not found (`GET /status`); workflow not running or Connector not found (`terminate`)               |
| `409` | See [409 conflict formats](#409-conflict-formats) below                                                           |
| `413` | Request body too large                                                                                            |
| `422` | Invalid request body (Pydantic) or invalid ingest payload (string `detail`)                                       |
| `500` | Connector or internal error (status may be forwarded from Connector)                                              |
| `502` | Cannot connect to Connector service                                                                               |
| `503` | Rate limit or connection limit exceeded                                                                           |

Full per-endpoint bodies: [API responses](/connector-api/reference/api-responses).

### Example: `delete` when session is not `UPLOADING`

```json theme={null}
{
  "detail": {
    "message": "Invalid upload session status",
    "expected": "UPLOADING",
    "actual": "DONE"
  }
}
```

HTTP status: **`409 Conflict`**. For a `DONE` session, call `initialize-session` to start a new upload cycle.

### 409 conflict formats

`409` uses **three different body shapes** depending on the endpoint:

**1. `POST /initialize-session`** — flat object (no `detail` wrapper):

```json theme={null}
{
  "status": "already_exists",
  "session_status": "UPLOADING",
  "upload_uuid": "...",
  "message": "Upload session already exists"
}
```

**2. Wrong session status** (`delete`, `ingest`, `start-upload` when not `UPLOADING`) — structured `detail`:

```json theme={null}
{
  "detail": {
    "message": "Invalid upload session status",
    "expected": "UPLOADING",
    "actual": "STARTED"
  }
}
```

**3. Pending background tasks** (`start-upload` only) — string `detail`:

```json theme={null}
{"detail": "Upload tasks are still in progress"}
```
