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

# Errors

> Every error code the Fibre API answers with: its HTTP status, what it means, and what to do.

Every error has the same fields: `error` (a sentence), `code` (stable, safe to match on), `request_id` (for
support) and `docs_url` (this page, at the code). How to handle them in code, and which to retry:
[errors, retries and limits](https://docs.fibre.dev/production/errors-and-limits.md).

## General

| Code | Status | Meaning |
| - | - | - |
| `invalid_request` | 400 | The request is malformed or a parameter is wrong |
| `unauthorized` | 401 | The request is not authenticated |
| `forbidden` | 403 | The credentials do not allow this |
| `not_found` | 404 | Nothing exists at this path or with this name |
| `conflict` | 409 | The request conflicts with the resource's current state |
| `payload_too_large` | 413 | The request body is larger than allowed |
| `rate_limited` | 429 | Too many requests: wait and retry |
| `internal` | 500 | Something failed inside Fibre; the request id identifies it |
| `unavailable` | 503 | A part of Fibre is unavailable for now: retry later |
| `invalid_json` | 400 | The body is not valid JSON |
| `validation_failed` | 400 | The body does not match the route's schema; `details` names the fields |

## Authentication and keys

| Code | Status | Meaning |
| - | - | - |
| `missing_credentials` | 401 | No `Authorization: Bearer …` header |
| `invalid_api_key` | 401 | The API key is malformed, unknown, revoked or expired |
| `invalid_token` | 401 | The access token is invalid or expired |
| `insufficient_scope` | 403 | The API key's scopes do not cover this route; `required` names the scope |
| `key_resource_bound` | 403 | The API key is limited to one sandbox |
| `key_broader` | 403 | A key cannot grant more than the key that creates it |
| `unknown_scope` | 400 | A requested scope does not exist; `areas` lists the valid areas |
| `api_key_not_found` | 404 | No API key with this id |
| `key_resource_not_found` | 404 | No sandbox with this ID to bind the key to |

## Sandboxes

| Code | Status | Meaning |
| - | - | - |
| `sandbox_not_found` | 404 | No sandbox with this id in the organization |
| `sandbox_limit` | 429 | The organization keeps as many sandboxes as its plan allows, awake or asleep: delete some first |
| `size_too_large` | 400 | The requested CPU and memory are larger than the largest size |
| `needs_vm` | 400 | A listed need (`docker`, `fuse`, …) runs only on runtime `vm`, but the runtime is `standard` |
| `init_needs_vm` | 400 | `init` (systemd as PID 1) runs only on runtime `vm` |
| `runtime_conflict` | 400 | `runtime` and the older `runtime_type` name different runtimes: send `runtime` only |
| `vm_unavailable` | 503 | No host that runs VMs is available: retry later, or use runtime `standard` if no need requires a VM |
| `invalid_cursor` | 400 | The `cursor` is not one this list returned: pass `next_cursor` as it came |
| `invalid_idempotency_key` | 400 | `Idempotency-Key` must be 1 to 255 printable characters without spaces |
| `idempotency_key_reused` | 422 | This `Idempotency-Key` was used with another request in the last 24 h: use a new key |
| `idempotency_key_in_progress` | 409 | The first request with this `Idempotency-Key` is still running: retry later |
| `snapshot_fields_fixed` | 400 | A sandbox started from a snapshot takes these fields from the snapshot |
| `create_failed` | 503 | Creating the sandbox failed and nothing was left behind: retry |
| `start_failed` | 503 | The sandbox failed to start: check the image and its entrypoint |
| `engine_error` | 503 | The sandbox failed to start: retry, or check the image and its entrypoint |
| `no_capacity` | 503 | No host has room for this sandbox now: retry later |
| `not_running` | 409 | The sandbox is asleep or not running |
| `command_required` | 400 | `command` must be a non-empty array of strings |
| `exec_failed` | 502 | The command could not be run in the sandbox |
| `exec_timeout` | 504 | The command ran past exec's 30 s limit and was stopped: start long commands in the background |
| `engine_unreachable` | 502 | The sandbox's host did not answer: retry |

## Commands

| Code | Status | Meaning |
| - | - | - |
| `command_not_found` | 404 | No command with this id in the sandbox's current awake period |

## Files

| Code | Status | Meaning |
| - | - | - |
| `path_required` | 400 | The `path` parameter is required |
| `invalid_path` | 400 | The path is not valid |
| `file_not_found` | 404 | No file or directory at this path |
| `file_is_directory` | 400 | The path is a directory, not a file |
| `file_not_directory` | 400 | A part of the path is a file, not a directory |
| `file_permission_denied` | 403 | The sandbox's user may not read or write this path |
| `file_exists` | 409 | Something exists at this path already |
| `directory_not_empty` | 409 | The directory is not empty: delete it with `recursive=true` |
| `file_too_large` | 413 | The file is larger than allowed |
| `upload_aborted` | 400 | The upload ended before its last byte; nothing was written |
| `disk_full` | 507 | The sandbox's disk is full |
| `files_unsupported` | 501 | This file operation is not supported on this sandbox |

## Secrets

| Code | Status | Meaning |
| - | - | - |
| `secret_not_found` | 404 | No stored secret with this name: set it first (`POST /v1/secrets`) |

## Snapshots and images

| Code | Status | Meaning |
| - | - | - |
| `snapshot_not_found` | 404 | No snapshot with this name in the organization |
| `snapshot_exists` | 409 | A snapshot with this name exists |
| `snapshot_source_not_found` | 404 | No sandbox to take the snapshot of |
| `snapshot_source_unsupported` | 400 | A snapshot cannot be taken of this sandbox |
| `snapshot_in_use` | 409 | Sandboxes still restore from this snapshot |
| `snapshot_failed` | 502 | Taking the snapshot failed |
| `snapshot_timeout` | 504 | The snapshot is still uploading: retry later |
| `image_required` | 400 | No image or snapshot named, and this deployment has no default image |
| `image_not_owned` | 403 | The image belongs to another organization |
| `keep_unavailable` | 409 | keep needs Fibre's keep-alive as the sandbox's first process: this sandbox runs its own entrypoint |
| `desktop_unavailable` | 503 | The desktop did not come up after the create (the image is not a Fibre desktop image, or it failed to start) |
| `browser_unavailable` | 409 | The sandbox's browser cannot start: its image has none (use the default image, or one built from it), or Chrome did not come up |
| `browser_unreachable` | 502 | The sandbox's browser did not answer through its tunnel |
| `image_registry_refused` | 400 | Images from this registry are not allowed |
| `image_not_found` | 404 | The image does not exist in its registry |
| `image_access_denied` | 403 | The registry refused access to the image: check the registry credentials |
| `image_too_large` | 413 | The image is larger than allowed |
| `image_rate_limited` | 429 | The image's registry is rate limiting pulls: retry later |
| `image_pull_failed` | 502 | Pulling the image failed |
| `image_pull_timeout` | 502 | Pulling the image took too long |
| `build_limit` | 429 | The organization has as many builds running as allowed |

## Billing and limits

| Code | Status | Meaning |
| - | - | - |
| `payment_required` | 402 | Out of credit: add funds or turn on auto top-up |
| `subscription_required` | 402 | Choose a plan or start the trial to run sandboxes |
| `trial_limit` | 402 | The trial does not allow this: choose a plan |
| `spend_limit` | 402 | The organization's spend limit is reached |
| `invalid_plan` | 400 | No plan with this id |
| `invalid_amount` | 400 | The amount is outside the allowed range |
| `billing_provider_error` | 502 | The payment provider returned an error: retry |
| `billing_error` | 503 | Recording the billing session failed: retry |
| `billing_not_configured` | 503 | Billing is not available on this deployment |
| `org_limit` | 429 | The organization already uses as much of the machines that could run this sandbox as one organization may: stop some first |

## Webhooks

| Code | Status | Meaning |
| - | - | - |
| `webhook_url` | 400 | The webhook URL is refused (not https, or a private address) |

## Retrying

`429` and `5xx` codes are temporary: retry with backoff. Everything else needs a change on your side first.


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