# Errors

Errors are [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem documents, sent with `content-type: application/problem+json`:

```json
{ "type": "https://holemonitor.live/docs/errors#validation", "title": "Validation failed", "status": 422,
  "detail": "url: must use https", "errors": [{ "field": "url", "message": "must use https" }] }
```

## bad-request
400. The body is not valid JSON, or a header is malformed.

## unauthorized
401. No credentials, or the API key is invalid or revoked.

## forbidden
403. The key lacks `write` scope, the route needs a dashboard session, the account is suspended, or a plan limit was reached. A plan-limit problem has `title` "Plan limit reached" and a `limit` field naming the limit: `terms`, `endpoints`, `broad_filters`, `api_keys`.

## not-found
404. The object does not exist or belongs to another account.

## conflict
409. An `Idempotency-Key` was reused for a different request, or the object's state does not allow the change.

## gone
410. The object existed and was removed.

## too-large
413. The request body is too large.

## validation
422. The body failed validation. `errors` lists each field and message.

## rate-limited
429. Too many requests. Wait for `retry-after` seconds.

## internal
500. An unexpected error. Retrying with the same `Idempotency-Key` is safe.

## unavailable
503. A dependency is unavailable. Retry later.
