Errors and Retries

Every error code the API returns, what it means, and whether to retry

Every answer of /createTask and /getTaskResult carries an errorId. 0 means success; any other value comes with an errorCode and an errorDescription:

{
  "errorId": 1,
  "errorCode": "ERROR_INVALID_TASK_DATA",
  "errorDescription": "websiteKey is required for TurnstileTaskProxyLess"
}

Catch on errorCode, never on the description: the description is for your logs and can gain context (a bad field name, a proxy status).

Codes

CodeerrorIdWhat it meansRetry?
ERROR_KEY_DOES_NOT_EXIST1The clientKey is unknown or revokedNo
ERROR_ZERO_BALANCE1Not enough balance for this task. Nothing was reservedAfter a top-up
ERROR_INVALID_DEVELOPER_KEY1The developerKey is invalid or disabledNo, drop it
ERROR_INVALID_TASK_DATA1A field is missing or malformed, or the sitekey does not match the pageNo, fix the request
ERROR_PROXY_NOT_DEFINED1A non-ProxyLess task without task.proxyNo, add a proxy or use the ProxyLess type
ERROR_PROXY_FORMAT1The proxy is not one clean token (whitespace, socks, a whole line from a list)No, fix the string
ERROR_PROXY_CONNECTION_FAILED1Your proxy refused or could not reach the targetNot on the same proxy line
ERROR_PROXY_BANNED1The target refuses your proxy address (403, or a 429/451/5xx with no challenge)Not on the same proxy line
ERROR_BLOCKED_TARGET1websiteURL or the proxy host is, or resolves to, a private or reserved addressNo
ERROR_TASK_TYPE_INACTIVE1The task type is not enabled on your keyNo, ask us to grant it
ERROR_TASK_TYPE_COMING_SOON1The task type is announced but not openNo
ERROR_WRONG_TASK_TYPE1Right site, wrong type: a standard sitekey sent to an Enterprise type (or the reverse)No, fix the type
ERROR_CAPTCHA_UNSOLVABLE12Every attempt was rejected by the site, or an interactive step could not be completedYes
ERROR_TIMEOUT12The solve did not finish inside its budgetYes
ERROR_TASK_QUEUE_FULL2The queue is too long: the task would wait too long, so it was refused at submissionYes, after a delay
ERROR_TASK_NOT_FOUND16The taskId is unknown or its result expired (10 minutes)No, the result is gone
ERROR_INTERNAL1Our side failedYes

Payload API errors use a different shape ({ "success": false, "error": { "code", "retryable" } }) and are documented on that page.

Retry Policy

  • Retry ERROR_CAPTCHA_UNSOLVABLE, ERROR_TIMEOUT, ERROR_TASK_QUEUE_FULL and ERROR_INTERNAL, with the same request and the same taskId where one exists. A second attempt succeeds often enough to be worth it; three attempts in a row failing on the same site means something else is wrong.
  • Back off on ERROR_TASK_QUEUE_FULL: a few seconds at first, then double. It is a capacity signal, not a transient hiccup.
  • Never retry on the same proxy line after ERROR_PROXY_CONNECTION_FAILED or ERROR_PROXY_BANNED: a customer proxy is not rotated for you, so the second attempt fails the same way. Use another line, or a residential one.
  • Fix, do not retry the codes marked No: they come from the request or the account.

Billing

A task refused at submission (balance, task data, proxy format, queue full) never reserves anything. A task accepted and then failed is refunded automatically, whatever the code: you pay for solved tasks only.

The refund is written when the task fails, so a balance read immediately after an error may still show the reservation. It is released by the same process that failed the task; the reconciler sweeps anything left behind.

On this page