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

# Errors

> The GPU Sandboxes API's error body, its named errors with their HTTP statuses, and which errors are safe to retry.

Errors use the standard Telnyx error body:

```json theme={null}
{
  "errors": [
    {
      "code": "…",
      "title": "resources_not_allowed",
      "detail": "GPU type `H100` isn't available; see GET /sandbox-gpu-types.",
      "source": { "pointer": "/gpu/type" }
    }
  ]
}
```

| Field | Description |
| - | - |
| `title` | For the GPU Sandboxes errors below, the error's name. |
| `detail` | What is wrong with this request and what is allowed. |
| `source.pointer` | JSON pointer to the request field at fault, when there is one. |
| `source.parameter` | The query or path parameter at fault, when there is one. |

> [!NOTE]
>
> During the preview, the `code` of the GPU Sandboxes errors below isn't final. Identify them by `title`.

## GPU Sandboxes Errors

### Access

| Status | `title` | Meaning | Retry |
| - | - | - | - |
| `403` | `sandboxes_require_verification` | The account isn't fully verified. | No |
| `403` | `sandboxes_not_whitelisted` | The account isn't enabled for the invite-only preview. Check with `GET /v2/ai/sandbox-access`. | No |
| `403` | `sandboxes_disabled` | Creating sandboxes and starting execs is disabled for the account. Other operations keep working. | No |
| `403` | `sandboxes_spend_limit_reached` | The account, or the API key the call was made with, has reached its GPU Sandboxes spend limit. Returned when creating a sandbox. | No |
| `503` | `sandbox_creation_paused` | Creating sandboxes is paused for everyone. | Later |

### Requests and Idempotency

| Status | `title` | Meaning | Retry |
| - | - | - | - |
| `409` | `request_in_progress` | A request with the same `Idempotency-Key` is still being processed. | Later, same key |
| `422` | `idempotency_key_reused` | The same `Idempotency-Key` was sent with a different request. | No |

### Creating Sandboxes

| Status | `title` | Meaning | Retry |
| - | - | - | - |
| `409` | `name_conflict` | A non-terminated sandbox of the account already has this `name`. | After it ends |
| `422` | `resources_not_allowed` | The GPU type or count isn't offered, or `gpu` is missing. | No |
| `422` | `registry_not_allowed` | The image's registry isn't a public DNS name, or resolves to an internal address. | No |
| `422` | `cidr_not_allowed` | A `cidr_allowlist` entry lies entirely inside internal ranges. | No |
| `422` | `invalid_env` | An `env` name isn't a POSIX name, starts with `TELNYX_SANDBOX_`, or a size limit is exceeded. | No |
| `422` | `invalid_workdir` | `workdir` isn't an absolute path. | No |
| `422` | `log_bucket_not_allowed` | `log_bucket` doesn't exist, isn't the organization's, is in another region, or isn't writable. | No |
| `429` | `quota_exceeded` | The organization's GPU limit for the requested type would be exceeded. `detail` names the type, the limit, and the usage. | After a sandbox ends |

### Running Sandboxes and Execs

| Status | `title` | Meaning | Retry |
| - | - | - | - |
| `409` | `sandbox_not_running` | The operation needs a `running` sandbox. | No |
| `409` | `exec_not_started` | The exec is still `starting`, so only `SIGKILL` (which cancels it) can be sent. | Once `running` |
| `422` | `invalid_command` | The argv breaks a size rule: at most 4,096 arguments, each at most 131,071 bytes, 1 MiB in total, no NUL byte. | No |
| `422` | `offset_out_of_range` | The attach `offset` is past the end of the exec's output so far. | No |
| `429` | `too_many_attaches` | The sandbox already has the maximum number of open attach connections. | After closing one |
| `429` | `too_many_log_readers` | The organization already has the maximum number of log streams open. | After closing one |

### Files

| Status | `title` | Meaning | Retry |
| - | - | - | - |
| `403` | `permission_denied` | The sandbox's user may not do this at the path, or the file system is read-only. | No |
| `409` | `path_type_mismatch` | The path is a directory where a file was expected, or the reverse, or neither a file nor a directory. | No |
| `409` | `directory_not_empty` | The directory isn't empty and `recursive` is `false`. | No |
| `413` | `file_too_large` | The file is over the 64 MiB per-request limit. | No |
| `413` | `directory_too_large` | The directory has more than 100,000 entries. | No |
| `422` | `invalid_path` | The path holds a NUL byte, ends in `.` or `..`, is under `/.telnyx` (writes and deletes), or is `/` (deletes). | No |
| `422` | `file_operation_failed` | The file system refused for another stated reason: no space, a name too long, a busy file or mount point, a symlink loop, or an I/O error. | Depends |

## Standard Errors

| Status | Code | Meaning | Retry |
| - | - | - | - |
| `400` | `10004` | Missing required parameter. `source` points at it. | No |
| `400` | `10015` | Bad request: the request isn't well-formed, or a value is invalid, such as a metrics range. `source` points at the field when there is one. | No |
| `400` | `10025` | String length out of range. `source` points at the field. | No |
| `400` | `10026` | Invalid parameter type. `source` points at the field. | No |
| `401` | `10009` | Missing or invalid API key. | No |
| `404` | `10005` | The resource doesn't exist or belongs to another organization. `detail` says what is missing. | No |
| `408` | `10008` | A file write's body didn't arrive within the call's time budget. The file is unchanged. | Yes |
| `503` | `10037` | A dependency can't answer right now. | Yes, with backoff |

Retry writes after a `503` with the same `Idempotency-Key`. See [Idempotency](https://developers.telnyx.com/docs/gpu-sandboxes/api-conventions.md#idempotency).
