# Refusals

When the Astris API refuses a request, it answers with an HTTP error status and a JSON body. The `error` field names the refusal, and some refusals add a `reason` and a `message`. Each page gives the exact body and what to do.

| Refusal | HTTP status |
| --- | --- |
| [unauthorized](/docs/errors/unauthorized) | 401 |
| [read_only_key](/docs/errors/read_only_key) | 403 |
| [project_scope](/docs/errors/project_scope) | 403 |
| [upgrade_required](/docs/errors/upgrade_required) | 403 |
| [preview](/docs/errors/preview) | 403 |
| [compose_unavailable](/docs/errors/compose_unavailable) | 403 |
| [bucket_limit](/docs/errors/bucket_limit) | 403 |
| [not_found](/docs/errors/not_found) | 404 |
| [bad_request](/docs/errors/bad_request) | 400 |
| [document_required](/docs/errors/document_required) | 400 |
| [confirm_required](/docs/errors/confirm_required) | 400 |
| [confirm_mismatch](/docs/errors/confirm_mismatch) | 400 |
| [conflict](/docs/errors/conflict) | 409 |
| [plan_active](/docs/errors/plan_active) | 409 |
| [bucket_not_empty](/docs/errors/bucket_not_empty) | 409 |
| [payload_too_large](/docs/errors/payload_too_large) | 413 |
| [rate_limited](/docs/errors/rate_limited) | 429 |
| [internal](/docs/errors/internal) | 500 |
| [upstream](/docs/errors/upstream) | 502 |
| [unavailable](/docs/errors/unavailable) | 503 |
| [storage_unavailable](/docs/errors/storage_unavailable) | 503 |

The [pre-flight check](/docs/errors/preflight) is not a refusal of the API: it answers 200 with a verdict on your repository.
