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

# Errors

> How v4 answers a request that fails.

A failed request is answered with a problem (RFC 9457), sent as `application/problem+json`:

```json theme={null}
{
  "type": "https://developer.plugchoice.com/api/errors/validation-failed",
  "title": "The request is invalid",
  "status": 422,
  "code": "validation-failed",
  "errors": [
    { "field": "name", "code": "invalid", "message": "must be between 1 and 255 characters" }
  ]
}
```

| Field | |
| - | - |
| `code` | The kind of problem, for your code to act on. `type` links to its page. |
| `title` | A short summary of the kind of problem. |
| `status` | The HTTP status. |
| `detail` | What went wrong with this request, when there is more to say than the title. |
| `errors` | With `validation-failed`: each field that broke a rule. |

Every answer carries an `X-Request-Id` header. Send it along when you ask support about a request.

## Field errors

Each entry in `errors` names the field by its path in the request, such as `name`, or `items[0].name` for a field in a list, and the rule it broke:

| `code` | |
| - | - |
| `missing-field` | A required field is missing. |
| `unknown-field` | The endpoint doesn't know this field. |
| `invalid-type` | The value has the wrong type, such as a number where text belongs. |
| `invalid` | The value breaks a rule. `message` says which. |

## Codes

| Code | Status |
| - | - |
| [`bad-request`](https://developer.plugchoice.com/api/errors/bad-request) | `400` |
| [`unauthenticated`](https://developer.plugchoice.com/api/errors/unauthenticated) | `401` |
| [`forbidden`](https://developer.plugchoice.com/api/errors/forbidden) | `403` |
| [`insufficient-scope`](https://developer.plugchoice.com/api/errors/insufficient-scope) | `403` |
| [`not-found`](https://developer.plugchoice.com/api/errors/not-found) | `404` |
| [`method-not-allowed`](https://developer.plugchoice.com/api/errors/method-not-allowed) | `405` |
| [`timeout`](https://developer.plugchoice.com/api/errors/timeout) | `408` |
| [`conflict`](https://developer.plugchoice.com/api/errors/conflict) | `409` |
| [`payload-too-large`](https://developer.plugchoice.com/api/errors/payload-too-large) | `413` |
| [`unsupported-media-type`](https://developer.plugchoice.com/api/errors/unsupported-media-type) | `415` |
| [`validation-failed`](https://developer.plugchoice.com/api/errors/validation-failed) | `422` |
| [`server-error`](https://developer.plugchoice.com/api/errors/server-error) | `500` |
| [`unavailable`](https://developer.plugchoice.com/api/errors/unavailable) | `503` |
| [`error`](https://developer.plugchoice.com/api/errors/error) | another `4xx` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.