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

# Errors

> HTTP status codes and common backend messages.

## Error Format

Errors follow standard NestJS error response shape:

```json theme={null}
{
  "statusCode": 400,
  "message": "Invalid connection code.",
  "error": "Bad Request"
}
```

## Common HTTP Status Codes

| Status | Meaning                                                |
| ------ | ------------------------------------------------------ |
| `400`  | Validation/business rule failed                        |
| `401`  | Missing/invalid auth credentials                       |
| `403`  | Authenticated but not allowed for resource             |
| `404`  | Resource not found                                     |
| `409`  | Conflict (duplicate key or active connection conflict) |
| `429`  | Rate limit exceeded                                    |

## Frequently Seen Messages

### Authentication / Authorization

* `API key is required`
* `Invalid API key`
* `Unauthorized`
* `Invalid connection code.`
* `Connection access denied`

### Search / Quote / Book / Cancel

* `Invalid connection code`
* `No connection`
* `Option reference expired or invalid`
* `Option reference invalid`
* `Accommodation code mismatch`
* `Stay dates mismatch`
* `Occupancy details mismatch`
* `Price changed`
* `Quote reference expired or invalid. Please quote again.`
* `The booking was not successful.`
* `bookingReference is required for cancellation`
* `Booking cannot be cancelled. Current status: ...`
* `This booking can no longer be cancelled after the check-in date`
* `This booking is not refundable according to the cancellation policy`

### Management APIs

* `Maximum number of API keys (10) has been reached`
* `API key not found`
* `User not found`
* `Cannot delete user from another partner`
* `Only admin can update user status`
* `Can only update user role status, not admin`
* `Connection not found`
* `Partner not found`
* `Another connection is already currentInUse for this partner/apiType/connectionType`

## Rate Limit Error (`429`)

When throttled, backend throws `Rate limit exceeded` and includes:

* `Retry-After` header (seconds)
* `X-RateLimit-Limit`
* `X-RateLimit-Remaining`
* `X-RateLimit-Reset`
