> Docs index: https://movekit.com/llms.txt. HTML version: https://movekit.com/docs/objects/error

# Error

Every failure. Branch on `code`; `message` and `nextAction` are for humans and may change.

## Fields

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `error` | object | yes |  |
| `error.code` | string | yes | Stable, machine-readable error code. Branch on it. One of `invalid_request`, `cursor_invalid`, `authentication_required`, `invalid_api_key`, `insufficient_scope`, `purchase_required`, `asset_not_licensed`, `not_found`, `method_not_allowed`, `payload_too_large`, `unsupported_media_type`, `rate_limit_exceeded`, `sample_busy`, `link_limit_exceeded`, `api_unavailable`, `api_disabled`, `delivery_unavailable`, `asset_not_available`, `internal_error`. |
| `error.message` | string | yes | What went wrong. |
| `error.requestId` | string | yes | Equals the X-Request-Id header. Quote it to support. |
| `error.retryable` | boolean | yes | True when the same request may succeed later without a change. Honour Retry-After when present. |
| `error.nextAction` | string | yes | What to do next. |
| `error.purchase` | PurchaseLinks | no | Only with asset_not_licensed: where to buy the refused exercise. |
| `error.purchase.exerciseUrl` | string | yes | The exercise's public page, where it can be bought on its own. |
| `error.purchase.packs` | array of PurchasePack | yes | The packs on sale that contain the exercise, in packs-page order. |
| `error.purchase.packs[].id` | string | yes | Purchased pack id. |
| `error.purchase.packs[].name` | string | yes | Display name. |
| `error.purchase.packs[].url` | string | yes | The pack on the public packs page. |
| `error.assetId` | string | no | Only with link_limit_exceeded: the asset whose download links for today are used up. Request the other files without it. |

## Example

```json
{
  "error": {
    "code": "invalid_request",
    "message": "See nextAction.",
    "requestId": "req_9f2c4d1e7a",
    "retryable": false,
    "nextAction": "Read the error code and follow the docs for it.",
    "purchase": {
      "exerciseUrl": "https://movekit.com/exercises/cable-row-bar-standing-row",
      "packs": [
        {
          "id": "pack-9",
          "name": "Starter Pack",
          "url": "https://movekit.com/packs"
        },
        {
          "id": "pack-10",
          "name": "Home Pack",
          "url": "https://movekit.com/packs"
        }
      ]
    },
    "assetId": "ex75-video"
  }
}
```

## Returned or accepted by

- [List exercises](https://movekit.com/docs/api/list-exercises.md): `GET`
- [Get an exercise](https://movekit.com/docs/api/get-an-exercise.md): `GET`
- [List taxonomies](https://movekit.com/docs/api/list-taxonomies.md): `GET`
- [Create deliveries](https://movekit.com/docs/api/create-deliveries.md): `POST`
- [Get entitlements](https://movekit.com/docs/api/get-entitlements.md): `GET`
- [Get usage](https://movekit.com/docs/api/get-usage.md): `GET`
