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

# Errors

> The HTTP status codes, the error object and the errors your integration must handle.

| Status | Meaning | `type` |
| :- | :- | :- |
| `2XX` | Success | |
| `4XX` | Your request is invalid | `invalid_request` |
| `429` | Too many requests | `rate_limit` |
| `5XX` | Flatpeak cannot process the request | `api_error` |

## Error object

Every endpoint returns errors in the same object.

```json theme={"system"}
{
  "object": "error",
  "live_mode": false,
  "type": "invalid_request",
  "code": "country_code_missing",
  "message": "Country code is required",
  "context": "connect.postal_address_capture",
  "time_created": "2026-01-24T14:15:22Z"
}
```

| Property | Description |
| :- | :- |
| `type` | `invalid_request`, `rate_limit` or `api_error` |
| `code` | Machine-readable, so branch on it. Each [Connect page](/docs/energy-api/reference/connect/tariff/start-session.md) in the API reference lists its codes |
| `message` | Human-readable description |
| `context` | Optional. The service and method that raised the error, such as `api.location_create` |
| `live_mode` | `true` for a live secret key, `false` for a test key |
| `time_created` | RFC 3339 timestamp |

## Errors to handle

| Code | Status | Meaning | Do |
| :- | :- | :- | :- |
| `no_tariff_connected` | `422` | No tariff is connected for the device in that direction | Send the user to Connect in the `TARIFF` flow |
| `no_price_data` | `422` | Flatpeak has had no price data for an extended period. `tariff.fetch.failed` has fired | Ask the user to reconnect. Retry at most once every 15 minutes |
| `setting_not_supported` | `422` | A settings update names a field path that is not in the device's `supported` list | Read `supported` on the [settings](/docs/energy-api/reference/device-settings/retrieve.md) and send only those paths |
| `account_disabled` | `422` | Your account is disabled, for example out of subscription. Every endpoint returns it | Restore billing in [Console](https://console.flatpeak.com) > **Settings** > **Billing**, or contact [support](https://console.flatpeak.com/support) |
| `too_many_requests` | `429` | You exceeded 400 requests per second on one endpoint | Back off exponentially and batch requests. A retry in a tight loop extends the throttling |
| `cursor_invalid`, `pagination_params_invalid` | `400` | The cursor or `limit` is invalid | See [pagination](/docs/energy-api/guides/platform/pagination.md#errors) |

`no_tariff_connected` and `no_price_data` come from every endpoint that needs prices, such as [prices](/docs/energy-api/reference/prices/retrieve-device.md) and [optimizations](/docs/energy-api/guides/tariffs/optimizations.md).


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