# validation-failed

<Badge variant="warning">400 Bad Request</Badge> <Badge variant="muted">validation-failed</Badge>

| Field           | Value                                              |
|-----------------|----------------------------------------------------|
| **Type URI**    | `https://docs.kordiam.app/docs/errors/validation-failed` |
| **HTTP Status** | `400 Bad Request`                                  |

## Description

The request body, query parameters, path variables, or headers failed validation. The response
includes an `errors` array that describes each violation, including its scope, field path, a
machine-readable code string, and a human-readable message.

## Response Example

```json
{
  "type": "https://docs.kordiam.app/docs/errors/validation-failed",
  "title": "Validation Failed",
  "status": 400,
  "detail": "Validation failed. Check the 'errors' array for details.",
  "instance": "/api/v2/platforms/0",
  "traceId": "abc-123-def",
  "errors": [
    {
      "scope": "path",
      "path": "id",
      "code": "range",
      "message": "must be greater than or equal to 1"
    }
  ]
}
```

## Common Causes

- Missing required fields in the request body
- Field values exceeding maximum size limits
- Invalid enum values that do not match the expected set
- Numeric fields with values outside the allowed range

## How to Fix

1. Inspect the `errors` array in the response. Each entry tells you which field failed validation (`path`), where it is located (`scope`), and what went wrong (`code` and `message`).
2. Correct the identified fields and retry the request.
