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

# Errors

Flatpeak uses HTTP status codes to indicate the success or failure of requests.

| Code  | Description                                                   |
| ----- | ------------------------------------------------------------- |
| `2XX` | Indicates success.                                            |
| `4XX` | Indicates an invalid request. (error type: `invalid_request`) |
| `429` | Indicates too many requests. (error type: `rate_limit`)       |
| `5XX` | indicates Flatpeak-related issues (error type: `api_error`).  |

## Error object

When an error needs to be returned in an API response, Flatpeak uses a standardised error object across all endpoints:

<CodeGroup>
  ```json Error response example theme={"system"}
  {
    "object": "error",
    "live_mode": false,
    "context": "connect.postal_address_capture",
    "type": "invalid_request",
    "code": "country_code_missing",
    "message": "Country code is required",
    "connect_token": "cot_6587fa4362341be5b524de3b",
    "time_created": "2022-01-24T14:15:22.003"
  }
  ```
</CodeGroup>

| Property        | Description                                                                                                                                                                                                                                                                       |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `object`        | Indicates API object type, i.e. `error`.                                                                                                                                                                                                                                          |
| `live_mode`     | Indicates if `live` or `test` mode API key was used.                                                                                                                                                                                                                              |
| `context`       | Indicates error context. It provides information on which service and method has failed. For example, `connect.postal_address_capture` or `api.location_create`.                                                                                                                  |
| `type`          | Indicates error type; possible values are `invalid_request` - when your request is invalid. And `api_error` when the Flatpeak service cannot process the request (these are rare).                                                                                                |
| `code`          | Connect-related error codes are listed in the Connect section of [api reference](/api-reference/anode/connect/) under the code sample of every page. General API-related error codes are listed in the API error codes table later on this page. Example: `country_code_missing`. |
| `message`       | Error description in the English language. Example: `Country code is required`.                                                                                                                                                                                                   |
| `connect_token` | The Connect token used to make the request resulted in an error.                                                                                                                                                                                                                  |
| `time_created`  | Timestamp when this error occurred.                                                                                                                                                                                                                                               |

## Important errors you must support

Your system must handle error codes related to energy price unavailability and cases where your Flatpeak account is disabled.

## Price unavailability errors

When energy price data is not available, Flatpeak returns a `422` error for **any** endpoint that depends on price data, including [retrieve a price](/api-reference/anode/prices/retrieve-a-price), [schedule by duration](/api-reference/anode/schedules/schedule-by-duration), [schedule by price limit](/api-reference/anode/schedules/schedule-by-limit), and [schedule by amount of energy](/api-reference/anode/schedules/schedule-by-amount).

<CodeGroup>
  ```json No tariff connected theme={"system"}
  {
    "object": "error",
    "type": "invalid_request",
    "context": "api.price_get",
    "code": "no_tariff_connected",
    "message": "No tariff connected for IMPORT direction",
    "time_created": "2025-01-01T00:00:00Z"
  }
  ```

  ```json Pending Connect session theme={"system"}
  {
    "object": "error",
    "type": "invalid_request",
    "context": "api.price_get",
    "code": "pending_connect",
    "message": "Connect is processing link to tariff source.",
    "time_created": "2025-01-01T00:00:00Z"
  }
  ```

  ```json Price data is unavailable theme={"system"}
  {
    "object": "error",
    "type": "invalid_request",
    "context": "api.price_get",
    "code": "no_price_data",
    "message": "No price data available for this request",
    "time_created": "2025-01-01T00:00:00Z"
  }
  ```
</CodeGroup>

* The `no_tariff_connected` code indicates that no tariff is connected to the queried location. Note that IMPORT and EXPORT tariffs are treated separately. See [Tariff categories, contexts, and energy flow directions](/guides/connect/settings-page#tariff-categories,-contexts,-and-energy-flow-directions).
* The `pending_connect` code indicates that Flatpeak Connect is accessing the customer’s tariff for the first time and the connection is pending. See [Tariff connection pending](/api-reference/anode/connect/tariff-connection-pending).
* The `no_price_data` code indicates that Flatpeak was unable to retrieve price data for an extended period and has already emitted the `tariff.fetch.failed` webhook. Review the [Required webhooks](/guides/connect/webhooks) article for more information.

<Warning>
  When you receive any of these errors, we recommend not to retry the same request more frequently than once every 15 minutes.
</Warning>

## Account disabled error

When your account is out of subscription or is disabled for any other reason, you will receive an error `422` when trying to access any API endpoint.

```json Acount disabled error example theme={"system"}
{
	"object": "error",
	"type": "invalid_request",
	"code": "account_disabled",
	"message": "Your account is disabled.",
	"time_created": "2026-01-29T17:11:52Z"
}
```

When it happens:

* Go to [Dashboard](https://dashboard.flatpeak.com) > **Settings** > **Billing** to restore your subscription
* Alternatively, contact [support](https://dashboard.flatpeak.com/#support)

## Rate limiting (429) error

Flatpeak enforces rate limits to ensure platform stability. If you exceed the allowed request rate, the API returns a `429` error.

```json Rate limit error example theme={"system"}
{
  "object": "error",
  "type": "rate_limit",
  "code": "too_many_requests",
  "message": "Too many requests. Please retry after a short delay.",
  "time_created": "2026-01-29T17:11:52Z"
}
```

The current rate limit is **400 requests per second** per endpoint. This threshold is subject to change.

To avoid hitting rate limits:

* **Batch requests** where possible rather than making many individual calls in quick succession.
* **Implement exponential backoff** — when you receive a `429` response, wait before retrying and progressively increase the delay between subsequent retries.

<Warning>
  Do not retry `429` responses immediately or in a tight loop. Doing so will extend the time your requests are throttled.
</Warning>
