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

# Errors and rate limits

> Handle errors returned by the four Morabaa Public API endpoints.

Every external API failure uses the same JSON shape.

```json theme={null}
{
  "error": "machine_readable_code",
  "message": "Human-readable explanation"
}
```

Use `error` for programmatic handling. Use `message` when logging or displaying context to an operator.

## HTTP statuses

| Status | Meaning                                                                 |
| ------ | ----------------------------------------------------------------------- |
| `400`  | The request is invalid or order creation failed                         |
| `401`  | The key is missing, malformed, inactive, revoked, expired, or incorrect |
| `403`  | The key lacks the required scope                                        |
| `404`  | The product or permitted order was not found                            |
| `429`  | The key's request limit was exceeded                                    |
| `500`  | An unexpected server error occurred                                     |
| `503`  | The store is under maintenance                                          |

## Rate limits

When you receive `429`, read the `Retry-After` response header before retrying.

<Tip>
  Use exponential backoff for transient `429` and `500` responses. Do not retry validation failures or missing-scope errors without changing the request or key.
</Tip>
