---
title: ErrorEnvelope schema
description: The envelope returned by every non-2xx response, including 429 and the /api/* 404 catch-all.
canonical_url: "https://cascades.crscreditapi.com/docs/api/schemas/ErrorEnvelope"
doc_version: "1.0.0"
last_updated: "2026-10-09T18:04:24Z"
source: "public/api-docs/v1/swagger.yaml#/components/schemas/ErrorEnvelope"
---

# ErrorEnvelope

The envelope returned by every non-2xx response, including `429` and the `/api/*` 404 catch-all.

Defined in [openapi.json](https://cascades.crscreditapi.com/openapi.json#/components/schemas/ErrorEnvelope) ([YAML](https://cascades.crscreditapi.com/openapi.yaml)).

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| &nbsp;&nbsp;`code` | string | yes | Stable machine-readable error code. Branch on this, never on `message`. |
| &nbsp;&nbsp;`message` | string | yes |  |
| &nbsp;&nbsp;`details` | array of object | no | Field-level detail when available; otherwise an empty array. |
| &nbsp;&nbsp;&nbsp;&nbsp;`field` | string | no |  |
| &nbsp;&nbsp;&nbsp;&nbsp;`message` | string | no |  |
| &nbsp;&nbsp;`request_id` | string | yes |  |
| &nbsp;&nbsp;`doc_url` | string (uri) | no | Link to the reference page for this error code |

```json
{
  "error": {
    "code": "validation_failed",
    "message": "The request could not be processed.",
    "details": [
      {
        "field": "execution_mode",
        "message": "must be test or live"
      }
    ],
    "request_id": "7d4c2f48-9a1b-4c3d-8e2f-1a2b3c4d5e6f",
    "doc_url": "https://cascades.crscreditapi.com/docs/api/errors/validation_failed"
  }
}
```

## Sitemap

See the full [sitemap](https://cascades.crscreditapi.com/sitemap.md) for all pages.
