> ## Documentation Index
> Fetch the complete documentation index at: https://808-labs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and retries

> Separate an HTTP failure from an unknown business outcome.

Recovery
A failed HTTP response can leave a successful business operation. Look up the original attempt before retrying.

## Read an error response

Structured application errors contain a stable code, a message, details and a request ID:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "error": {
    "code": "feature_not_in_plan",
    "message": "Feature is not available in this plan",
    "details": {},
    "request_id": "example-request-id"
  }
}
```

The message is illustrative. Use the stable code for application decisions. Some framework validation responses use their framework error shape; always check status and the endpoint contract.

## Decide what to do next

| Status | Typical handling |
| - | - |
| `401` | Check credential validity and the correct environment |
| `403` | Check role/scope, plan feature and resource ownership |
| `409` | Reconcile the current state, revision or original idempotency receipt |
| `409 environment_mismatch` on connection creation | Send the request to the API runtime matching the declared Sandbox or Live environment; no connection was created or provider authorization attempted |
| `422` | Correct the request before making a new intentional attempt |
| `429` | Honor `Retry-After` when present. `rate_limited` is a per-second ceiling (retry after the delay); `plan_quota_exceeded` is a monthly or cost cap |
| `408 request_body_timeout` | Input was incomplete past the receive deadline; no authentication, usage or business work occurred. Retry a complete request with the original business identity |
| `413 request_body_too_large` | Body exceeded the input limit before execution; reduce its size before retrying |
| `406 not_acceptable` (`GET /v1/openapi.json`) | The request excluded both gzip and identity encoding; accept one of them |
| `412 precondition_failed` (`GET /v1/openapi.json`) | `If-Match` did not match the current schema; fetch it again without the condition |
| `503 capacity_unavailable` | Input queue full or admission wait expired before execution; honor `Retry-After` and retain the original business identity |
| `5xx` or transport timeout | Bound read retries; treat a write's outcome as potentially unknown |

## Requests and business operations

Use a fresh correlation/request ID for each HTTP attempt. Use a stable business idempotency key for exact retries **only on operations that support it**. Persist the original resource, key and body; changing the body under the same identity is a conflict, not a new purchase.

For an unknown write, first inspect the original cart/purchase/refund or command receipt. Do not change merchant route, create another payment or issue a speculative refund because a response was lost.

## Escalate with context

Share the request ID, environment, operation and sanitized resource references with support. Do not send API keys, signing secrets, addresses, raw card data or complete provider payloads.

## Related guides

> [card] [Checkout lifecycle](https://808-labs.mintlify.site/checkout-and-refunds.md)
>
> Keep the original quote, cart and purchase identities.

> [card] [Get support](https://808-labs.mintlify.site/security-and-support.md)
>
> Share sanitized request references without exposing secrets.


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