# Panes

Canonical: https://usepanes.com/docs/errors

## Errors

Errors keep an `error` string and add a stable `code` and recovery `action`. Some guest and host errors expose only `error`; always read it. Never assume a failed HTTP response means a write did nothing.

```json
{"error":"add prepaid credit to cover 15 minutes of the resulting running computers, then retry this same request","code":"insufficient_balance","action":"prepay_then_retry","balance_usd":0.1,"required_balance_usd":0.1875,"topups_url":"https://api.usepanes.com/v1/topups","funding_url":"https://usepanes.com/dashboard/billing"}
```

| Status | Recovery |
| --- | --- |
| 400 | Correct the named field. For a rejected wallet signature, authorize the original quote again. |
| 401 | Supply a valid key. Expired or exhausted email challenges need a new signup challenge. |
| 402 | Prepay and retry the original compute request key. On a payment endpoint, authorize the returned protocol challenge. |
| 403 | Check account permissions, suspension or dispute state. A different payment will not remove a suspension. |
| 404 | List this account's resources and check the ID. After uncertain create, use its request-key lookup. |
| 409 | Read current state. Check Office readiness, restore state, cloning protection or idempotency-body mismatch. |
| 413 | Split the request or use direct file transfer. Input bodies are limited to 64 KiB. |
| 429 | Follow `Retry-After`. For an explicit account restriction, stop/delete unused resources or contact support. |
| 500 / 502 / 503 / 504 | Inspect current state before retrying writes. For capacity errors, wait and retry the same compute request key. |

When `uncertain: true`, a write or command may already have happened. For computer creation, use `/v1/machine-requests/{key}`. For payment, poll its status URL. For commands and input, inspect output files and the desktop. Never repeat a payment to recover an uncertain response.

Unexpected server errors include a support reference. Send that reference or the top-up/computer ID to support@usepanes.com, without keys, payment credentials or document contents.
