# Error responses

## Status codes

- `400` - your input was rejected. Not retryable as-is; the body carries `retry_with`
  (method, path, body) and `keys_you_sent`.
- `402` - payment required. Read `PAYMENT-REQUIRED`; nothing charged yet.
- `409` - replay or ambiguity: payment already used, or a publish id matches several listings.
- `429` - rate limited. Back off; not a service verdict.
- `5xx` - our side or upstream. The paid call is refunded (`X-Minia2a-Refund`).

## Headers that make errors actionable

- `X-Minia2a-Accepts` - field names this endpoint reads
- `X-Minia2a-Example` - a body that works (percent-decoded = JSON)
- `X-Minia2a-Refund` - refund state on failed paid calls
- `retry_with` in a 4xx body - a complete request to replay

## Inside a 200

A service can answer 200 with {"ok": false}. Read `ok`; when false read `cause`:
`platform` (upstream or ours) vs `service` (the endpoint itself).

## Warning

Do not treat ok:true as "everything worked": a handler that swallows a failed sub-step still
answers ok:true. That is why per-endpoint delivery numbers are published at /availability.
