> ## Documentation Index
> Fetch the complete documentation index at: https://docs.get-exo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validation error

> The request was understood but one or more fields failed validation.

This page is the resolution target of the RFC 9457 `type` URI on every `validation_error` problem body: `https://docs.get-exo.com/errors/validation_error`.

**HTTP status: `422` Unprocessable Content**.

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "type": "https://docs.get-exo.com/errors/validation_error",
  "title": "Validation error",
  "status": 422,
  "detail": "2 field(s) failed validation",
  "code": "validation_error",
  "requestId": "req_9f2c41ab7d0e5c18",
  "errors": [
    {
      "pointer": "#/body/query",
      "field": "query",
      "code": "missing",
      "message": "Field required"
    },
    {
      "pointer": "#/body/topK",
      "field": "topK",
      "code": "less_than_equal",
      "message": "Input should be less than or equal to 50"
    }
  ]
}
```

## Why it happens

This is the only code that always carries an `errors[]` array, and the array is the useful part. Each entry names one violation with a JSON pointer, the field, a machine code and a human message.

Field-level codes come from two places. Pydantic supplies the shapes of a malformed body: `missing`, `json_invalid`, `string_too_short` and their siblings. Exo supplies domain-specific ones such as `invalid_format` on a malformed subject id, `unsupported_provider` on a connector selector, and the webhook URL family described below.

## How to fix it

* Read `errors[]` rather than `detail`. The pointer tells you exactly which field to correct.
* Retry with a corrected body. If the original request carried an `Idempotency-Key`, the key was released rather than persisted, so you can reuse it.

## Field-level codes

These appear as `errors[].code`, never as the top-level `code`. The top-level code stays `validation_error`.

| `errors[].code`           | Meaning                                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------------------- |
| `missing`                 | A required field was absent.                                                                            |
| `json_invalid`            | The body was not parseable JSON.                                                                        |
| `invalid_format`          | A subject id, key id or export id did not match its permitted character set.                            |
| `unsupported_provider`    | The connector path segment named a provider other than `github`.                                        |
| `unknown_expand_relation` | An `expand` value is not an expandable relation on this route.                                          |
| `missing_url`             | A webhook registration omitted the url.                                                                 |
| `invalid_url`             | The webhook url could not be parsed, or its port is not a number, or it has no host.                    |
| `url_too_long`            | The webhook url is longer than 2048 characters.                                                         |
| `userinfo_not_allowed`    | The webhook url carries `user:pass@` credentials.                                                       |
| `unsupported_scheme`      | The webhook url is not https.                                                                           |
| `https_required`          | The webhook url used plain http where https is required.                                                |
| `port_not_allowed`        | The webhook url used a port other than the default https port.                                          |
| `unresolvable_host`       | The webhook hostname does not resolve.                                                                  |
| `blocked_address`         | The webhook hostname resolves to a private, loopback, link-local, CGNAT, reserved or tunnelled address. |
| `event_types_required`    | A webhook registration subscribed to no event types.                                                    |
| `invalid_event_type`      | A subscribed event type is empty or is not in the catalogue.                                            |
| `too_many_event_types`    | A webhook subscribed to more than 20 event types.                                                       |

## Related

* [`invalid_expand`](/errors/invalid_expand)
* [`confirm_token_invalid`](/errors/confirm_token_invalid)
* [`idempotency_key_reuse`](/errors/idempotency_key_reuse)
* [Errors](/platform/errors) for the envelope and the full catalogue
