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

# Errors

> What error.code means and what to do about it.

A failed call resolves to `[null, error]`:

```ts theme={null}
type SdkError = {
  code: ErrorCode;
  message: string;
  // the http status, or null when the request never got an answer
  status: number | null;
};
```

| `code` | Status | Meaning |
| - | - | - |
| `bad_request` | 400, 422 | The input was rejected. `message` says which field. |
| `unauthorized` | 401 | The API key is missing, wrong or revoked. |
| `forbidden` | 403 | The key may not do this. |
| `not_found` | 404 | Nothing has that id. Send the contact with `contacts.upsert` first. |
| `conflict` | 409 | The account belongs to another contact with its own `dbId`. |
| `limit_reached` | 403 | The workspace's plan has no room for another, such as a contact. |
| `rate_limited` | 429 | Too many requests. Wait and retry. |
| `server_error` | 5xx | Something failed on our side. Retrying is safe. |
| `network_error` | — | The request never got an answer. Retrying is safe. |

> [!TIP]
>
> `contacts.upsert` and `events.add` with an `idempotencyKey` are safe to retry on any error.


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