# Compatible error codes

> Every errorCode the compatible API returns, and what it means.

Source: https://docs.peak.fo/docs/compat/errors

Every response from the compatible API is HTTP `200`. A failure has `errorId` above `0`, an `errorCode`, and an `errorDescription` in words:

```json
{
  "errorId": 12,
  "errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
  "errorDescription": "Challenge was flagged - try using a different proxy with a cleaner IP reputation"
}
```

The codes follow the service your code is written for:

- **2Captcha, Anti-Captcha and CapMonster code** gets their `errorId` numbers and `errorCode` names.
- **CapSolver code** gets CapSolver's `errorCode` names, always with `errorId` `1`. A request is treated as CapSolver code when its task type starts with `AntiTurnstile` or is `AntiCloudflareTask`, or when its `taskId` is a UUID.

`errorDescription` uses the same words as the native API's `error`, so it often says more than the code. None of these are charged.

## Codes [#codes]

| `errorId` | `errorCode`                       | CapSolver `errorCode`       | What happened                                                                                                                                          | What to do                                                       |
| --------- | --------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| `1`       | `ERROR_KEY_DOES_NOT_EXIST`        | `ERROR_KEY_DENIED_ACCESS`   | The key is missing, wrong, or turned off.                                                                                                             | Use an active key from [Dashboard → API keys](https://peak.fo/dashboard/keys). |
| `55`      | `ERROR_ACCOUNT_SUSPENDED`         | `ERROR_KEY_DENIED_ACCESS`   | Your account is suspended.                                                                                                                            | [Contact support](/docs/support).                                |
| `10`      | `ERROR_ZERO_BALANCE`              | `ERROR_ZERO_BALANCE`        | Your balance is below the task's price, the package is used up or expired, or the package doesn't cover this task.                                    | [Top up](https://peak.fo/dashboard/topup), or use another key.   |
| `2`       | `ERROR_NO_SLOT_AVAILABLE`         | `ERROR_RATE_LIMIT`          | You're over your key's rate limit.                                                                                                                     | Retry in a moment. See [Rate limits](/docs/api#rate-limits).     |
| `2`       | `ERROR_NO_SLOT_AVAILABLE`         | `ERROR_SERVICE_UNAVALIABLE` | The task type is turned off for now, no solver is free, or something went wrong on our side.                                                          | Retry in a few seconds.                                          |
| `110`     | `ERROR_BAD_PARAMETERS`            | `ERROR_INVALID_TASK_DATA`   | A field is missing or invalid: `websiteURL`, `websiteKey`, the proxy, `htmlPageBase64`, `action`, `cData`, the user-agent or the challenge page.      | Fix the field that `errorDescription` names.                     |
| `22`      | `ERROR_TASK_ABSENT`               | `ERROR_INVALID_TASK_DATA`   | The body has no `task` object.                                                                                                                          | Send the task in `task`.                                         |
| `23`      | `ERROR_TASK_NOT_SUPPORTED`        | `ERROR_TASK_NOT_SUPPORTED`  | The task type isn't one Peak Solutions solves.                                                                                                         | Use a [supported task type](/docs/compat#supported-services).    |
| `21`      | `ERROR_IP_BLOCKED`                | `ERROR_TASK_NOT_SUPPORTED`  | The target site or sitekey is blocked, or needs a top-up first. `errorDescription` says which.                                                        | [Contact support](/docs/support) if you think it's a mistake.    |
| `16`      | `ERROR_NO_SUCH_CAPCHA_ID`         | `ERROR_TASKID_INVALID`      | The task doesn't exist, has expired, or belongs to another account.                                                                                    | Create a new task. See [Task not found](/docs/compat/get-task-result#task-not-found). |
| `12`      | `ERROR_CAPTCHA_UNSOLVABLE`        | `ERROR_CAPTCHA_UNSOLVABLE`  | The solve failed: it timed out, the challenge flagged the request, or the solver couldn't produce a result.                                           | Retry, if needed with a different proxy.                         |
| `25`      | `ERROR_PROXY_CONNECT_REFUSED`     | `ERROR_PROXY_BANNED`        | Your proxy failed, or Cloudflare blocked its IP.                                                                                                       | Check the proxy, or use one with a cleaner IP.                   |
| `31`      | `ERROR_RECAPTCHA_INVALID_SITEKEY` | `ERROR_INVALID_TASK_DATA`   | The sitekey is wrong for that site.                                                                                                                    | Check the sitekey belongs to the page. See [Find the sitekey](/docs/find-sitekey). |

## How native codes map [#how-native-codes-map]

The solve behind a task is the same one the native API runs, so a failure starts as a native [error code](/docs/api/errors) and is sent as the code below.

| Native `error_code`                                                                                                                          | Compatible code                   |
| -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `missing_api_key`, `invalid_api_key`, `api_key_inactive`                                                                                     | `ERROR_KEY_DOES_NOT_EXIST`        |
| `account_suspended`                                                                                                                          | `ERROR_ACCOUNT_SUSPENDED`         |
| `insufficient_balance`, `package_exhausted`, `task_not_authorized`                                                                           | `ERROR_ZERO_BALANCE`              |
| `rate_limited`                                                                                                                               | `ERROR_NO_SLOT_AVAILABLE`         |
| `task_disabled`, `proxyless_unavailable`, `no_servers`, `billing_error`, `auth_error`, `internal_error`                                     | `ERROR_NO_SLOT_AVAILABLE`         |
| `missing_fields`, `invalid_proxy`, `invalid_action`, `invalid_cdata`, `invalid_html`, `invalid_request_data`, `unsupported_user_agent`, `proxy_required`, `invalid_request_body`, `request_too_large` | `ERROR_BAD_PARAMETERS`            |
| `task_blocked`                                                                                                                               | `ERROR_IP_BLOCKED`                |
| `proxy_error`, `ip_blocked`                                                                                                                  | `ERROR_PROXY_CONNECT_REFUSED`     |
| `invalid_sitekey`                                                                                                                            | `ERROR_RECAPTCHA_INVALID_SITEKEY` |
| `timeout`, `solve_failed`, `challenge_flagged`, `turnstile_failed`, `no_challenge`, `solver_error`, `unknown`, and any other                 | `ERROR_CAPTCHA_UNSOLVABLE`        |
