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

# Errors & limits

> GraphQL error extension codes, batch and pagination limits, and socket caps.

GraphQL errors follow the standard shape — a message plus machine-readable `extensions`:

```json JSON theme={"theme":"css-variables"}
{
  "errors": [
    {
      "message": "Too many betIds (max 25)",
      "extensions": { "code": "BAD_USER_INPUT", "error": "too_many_bet_ids", "max": 25 }
    }
  ]
}
```

Branch on `extensions.error` (stable slug), not the human-readable message.

## Error codes

| `extensions.code`       | `extensions.error`         | Query                      | Meaning                                                                                             |
| ----------------------- | -------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------- |
| `BAD_USER_INPUT`        | `invalid_chain_id`         | `betResult` / `betResults` | `chainId` must be a positive integer                                                                |
| `BAD_USER_INPUT`        | `invalid_bet_id`           | `betResult`                | `betId` must be a decimal integer string                                                            |
| `BAD_USER_INPUT`        | `bet_ids_required`         | `betResults`               | Empty `betIds` array                                                                                |
| `BAD_USER_INPUT`        | `too_many_bet_ids`         | `betResults`               | Over the batch cap; `extensions.max` carries the limit                                              |
| `NOT_FOUND`             | `bet_not_found`            | `betResult`                | No such bet on that chain                                                                           |
| `NOT_FOUND`             | `network_not_configured`   | `betResult` / `betResults` | `chainId` isn't a network the API serves — check [`networkConfigs`](/api-reference/network-configs) |
| `SERVICE_UNAVAILABLE`   | `bet_realtime_unavailable` | `betResult` / `betResults` | Result pipeline not configured on this deployment                                                   |
| `INTERNAL_SERVER_ERROR` | `fetch_failed`             | `betResult` / `betResults` | Transient upstream failure — retry with backoff                                                     |

Validation errors on `playerBets` / `pendingBetCount` (bad address format, unknown `networkId`, invalid `filter.status`) return a plain message without an `extensions.error` slug — treat any error from those queries as a caller bug to fix, not a retry case.

## Limits

| Limit                       | Value                                                 | Where                                               |
| --------------------------- | ----------------------------------------------------- | --------------------------------------------------- |
| `betResults` batch size     | **25** ids per request                                | [betResult / betResults](/api-reference/bet-result) |
| `playerBets` page size      | `limit` clamped to **1–200** (default 50)             | [playerBets](/api-reference/player-bets)            |
| Socket wallet subscriptions | **50** wallets per socket (and per subscribe message) | [Socket.IO — bets](/api-reference/socket-bets)      |

## Degraded modes (not errors)

Some unavailability is expressed in-band rather than thrown:

* `playerBets` returns `source: "unavailable"` with an empty list when the indexed store is down or unconfigured.
* `pendingBetCount` returns `0` in the same situation.
* `betResult.proof` is `null` when a proof couldn't be produced — the result is still valid; fall back to seed-reveal claiming ([Results & proofs](/integrate/results-and-proofs)).

Handle these as empty/degraded states in your UI, not failures.
