Sandboxes
Errors
The error format and every error code the Sandboxes API returns.
Errors come back as JSON with an HTTP status, a stable code you can match on, and a message written for people:
{ "error": { "code": "plan_limit", "message": "The Free plan allows up to 2 vCPUs" } }Messages never include details of the machines underneath. When something fails on our side, the message names the sandbox or snapshot id to send to support.
| Status | code | What happened |
|---|---|---|
| 400 | invalid_request | A field is missing or out of range. The message says which. |
| 400 | no_organization | A dashboard session with no organization selected. |
| 401 | unauthorized | No API key, or it's wrong or revoked. |
| 402 | usage_limit | The Free plan's included usage for this month is used up. |
| 403 | forbidden | An API key tried to approve or deny, or a person outside the organization. |
| 403 | plan_limit | Your plan doesn't allow this size, class, session length, open internet access, snapshot count or reserved machine. |
| 404 | not_found | No such sandbox, execution, snapshot or reservation in your organization. |
| 404 | file_error | The file doesn't exist. |
| 409 | not_running | The sandbox isn't running (it's starting, paused or stopped). |
| 409 | not_ready | The sandbox is still starting. |
| 409 | not_paused | Resume on a sandbox that isn't paused. |
| 409 | not_pending | Approve or deny on a command that isn't waiting. |
| 409 | busy | Pause while a command is still running. |
| 409 | paused_storage_full | Your paused sandboxes already hold the disk your plan allows (10 GB on Free, 50 GB on Team). Resume or delete one, then pause again. |
| 409 | conflict | The sandbox changed state during the call. Try again. |
| 409 | snapshot_not_ready | Create from a snapshot that isn't ready. |
| 409 | reservation_in_use | The reserved machine is already running a sandbox. |
| 413 | too_large | The snapshot is bigger than your plan allows. |
| 429 | limit_reached | Too many sandboxes running at once. |
| 502 | start_failed | The sandbox failed to start. Try again. |
| 502 | resume_failed | The sandbox couldn't be resumed. |
| 502 | pause_failed | The sandbox couldn't be paused. It's still running. |
| 502 | restore_failed | The new sandbox couldn't load the snapshot. |
| 502 | snapshot_failed | The snapshot couldn't be saved. Try again. |
| 502 | agent_error | The sandbox didn't answer as expected. |
| 500 | internal | Something broke on our side. |
A command that runs and exits with a non-zero code isn't an error: exec returns 200 with its exitCode. If the sandbox stops answering mid-command, the execution is marked failed with a plain explanation in stderr.