> For the complete documentation index, see [llms.txt](https://docs.gameket.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gameket.io/introduction/concepts/error-handling.md).

# Error Handling

All errors follow a standard format:

```json
{
  "success": false,
  "error": "Order not found",
  "code": "ORDER_NOT_FOUND",
  "requestId": "req_abc123def456"
}
```

#### Common Status Codes

| Code | Meaning           | Action                 |
| ---- | ----------------- | ---------------------- |
| 200  | OK                | Success                |
| 201  | Created           | Resource created       |
| 400  | Bad Request       | Invalid parameters     |
| 401  | Unauthorized      | Invalid/missing token  |
| 403  | Forbidden         | Not allowed            |
| 404  | Not Found         | Resource doesn't exist |
| 409  | Conflict          | Duplicate/conflict     |
| 429  | Too Many Requests | Rate limited           |
| 500  | Server Error      | Retry later            |

#### Using Request IDs

Every response includes a `requestId` for debugging:

```json
{
  "success": false,
  "error": "Database connection failed",
  "code": "DB_ERROR",
  "requestId": "req_xyz789"
}
```

Save this ID when reporting issues to support.
