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

# Errors

> Error response format and codes

## Format

All error responses share this shape:

```json theme={null}
{
  "error": {
    "code": "LOCATION_NOT_FOUND",
    "message": "Location 123 was not found for the provided tenant",
    "requestId": "b1f6e6b0-1234-4abc-9def-000000000000"
  }
}
```

`requestId` is unique per request — include it when contacting RiDERgy
support about a specific error.

## Error codes

| Code                   | HTTP status | Meaning                                                                                                                                                                         |
| ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `UNAUTHORIZED`         | 401         | Missing, invalid, inactive, or expired API key.                                                                                                                                 |
| `FEATURE_NOT_ENABLED`  | 403         | The Energy Management API is not enabled for your tenant.                                                                                                                       |
| `INVALID_REQUEST_BODY` | 400         | The request body is missing required fields, malformed JSON, or fails validation (e.g. `limitKw <= 0`, `endTime <= startTime`, `endTime` in the past, `priority` outside 0–10). |
| `TARGET_INACTIVE`      | 400         | The target location is marked inactive.                                                                                                                                         |
| `LOCATION_NOT_FOUND`   | 404         | No location with the given `locationId` exists for your tenant.                                                                                                                 |
| `CHARGER_NOT_FOUND`    | 404         | No connector with the given `controllerUuid`/`connectorId` exists for your tenant.                                                                                              |
| `CLUSTER_NOT_FOUND`    | 404         | No cluster with the given `clusterId` exists for your tenant.                                                                                                                   |
| `CLUSTER_INACTIVE`     | 400         | The cluster's `status` is `INACTIVE`.                                                                                                                                           |
| `CLUSTER_EMPTY`        | 400         | The cluster has no member locations.                                                                                                                                            |
| `NOT_FOUND`            | 404         | The path/method combination is not a valid endpoint.                                                                                                                            |
| `INTERNAL_ERROR`       | 500         | Unexpected server-side error.                                                                                                                                                   |
