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

# Errors

> Handle the v1 problem response and use stable error codes to decide when to retry.

The v1 handler returns errors as `application/problem+json`. Branch on `code`, display `detail` when useful, and log the `request_id` for support. The same ID appears in `X-Request-Id`. Validation errors can include an `errors` array with up to 20 entries, each with a dotted `path` and a `message`. Check the content type before parsing an error body.

```json GET /v1/me 401 theme={null}
{
    "type": "https://shoplist.co/docs/errors#unauthenticated",
    "title": "Unauthenticated",
    "status": 401,
    "detail": "Authentication is required.",
    "code": "unauthenticated",
    "request_id": "req_0123456789abcdef01234567"
}
```

These errors make up the shared error contract. See the generated API reference for the errors documented on each operation.

## invalid\_request

HTTP 400. Correct the request using `detail` and any `errors` entries.

## unauthenticated

HTTP 401. Check the [authentication](/docs/authentication.md) requirements.

## plan\_required

HTTP 402. See your plan for API access.

## allowance\_exceeded

HTTP 402. Read the remaining allowance and period end with [GET /v1/usage](/docs/usage.md).

## insufficient\_credits

HTTP 402. Check available credits before trying again.

## spending\_cap\_exceeded

HTTP 402. Reduce the requested work or review the cap before retrying.

## insufficient\_scope

HTTP 403. Use a key with the scope required by the operation.

## not\_found

HTTP 404. Check the path or resource identifier.

## method\_not\_allowed

HTTP 405. Check the operation's HTTP method.

## idempotency\_in\_progress

HTTP 409. Wait for `Retry-After`, then retry the same request with the same key.

## cursor\_expired

HTTP 410. Start again from the first page.

## payload\_too\_large

HTTP 413. Send a smaller JSON body.

## idempotency\_key\_reused

HTTP 422. Retry with the original input, or use a fresh key for a different request.

## rate\_limited

HTTP 429. Wait for `Retry-After` before retrying.

## internal\_error

HTTP 500. Retry safe requests with bounded backoff. Keep the request ID if the error persists.

## service\_unavailable

HTTP 503. Wait for `Retry-After` before retrying a safe request.


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