# Errors and troubleshooting

Every error has the same shape: an HTTP status, a `code`, a message and, where
it helps, a `details.reason` you can branch on. Requests also return an ID in
`X-Request-ID`; quote it when you contact support.

## Common situations

| Situation | What to do |
| --- | --- |
| 429 `RESOURCE_EXHAUSTED` | An allowance is fully used. Check **Usage**, then delete or cancel work you no longer need, including deletions still in progress. The error names the limit when it can; **Usage** shows the limits and current use your role can view. |
| 503 `UNAVAILABLE`, reason `CAPACITY_UNAVAILABLE` | Every qualified GPU is busy. Wait for running work to finish; submitting again does not create capacity. Match on `error.details.reason`, not only `error.code`. |
| 400 `INVALID_ARGUMENT` on a model | The reason says what to change; see [Which models work](/inference/deploy). |
| Endpoint stays `DEPLOYING` | Follow its deployment events. Loading a model can take several minutes. |
| Run `FAILED` | Read `failure.reason` and the logs; see [failure reasons](/training/runs). |
| 401 `UNAUTHENTICATED` | Sign in again, or replace an expired or revoked key. |
| 403 `PERMISSION_DENIED` | The credential lacks the role, or an invocation key is bound to another Endpoint. |
| Connection lost during a create or delete | Check the resource and its Operation before trying again. Retrying with the same `Idempotency-Key` returns the original result instead of creating a duplicate. |
| Deletion still pending after ten minutes | Keep the Operation ID and contact support. |

## Allowances and capacity

Your organization has **allowances**: how many GPUs it may use at once and how
much Data it may store. A starter organization may use eight GPUs at once and
store 1 GiB of Data. An allowance lets you submit work; it does not reserve
hardware. **Capacity** is whether a qualified GPU is free right now. A request
can be within your allowance and still be refused because no GPU is free.

Work being deleted or cancelled still counts against your allowance until its
hardware is released. Larger allowances are arranged through support.

## Operations

Starting, updating or deleting a workload returns an **Operation** right away.
It tells you the request was accepted, not that it finished.

```sh
nestor operations list
nestor operations wait op_…
```

An accepted Endpoint is not a ready Endpoint, and a submitted run is not a
finished run. Wait for the resource's own state.

## Contacting support

Email **tirth@nestor.software** with the request, run, Endpoint or Operation ID
and the approximate time in UTC. Do not include keys, tokens, private prompts or
source secrets.
