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

# Errors

> One error envelope, and what each errorCode means for whether retrying can help

## One shape, every failure

Every failure — whether it came from the scrape pipeline or was rejected at the edge — returns the
same body:

```json theme={null}
{
  "error": {
    "code": 403,
    "errorCode": "WEBSITE_BLOCKED",
    "message": "akamai refused this request (HTTP 403) (gave up after 86s, 1 of 3 attempts used). The challenge was not solved on any attempt, so retrying and POST /api/v1/batch/scrape will fail the same way.",
    "traceId": "7520b9b2-60d7-4518-a098-e558d07c0b2e",
    "timestamp": "2026-11-15T04:14:43.390Z"
  }
}
```

`message` is always a string. Validation problems arrive as a list in `details`. `traceId` is also
returned in the `x-trace-id` header and is what to quote when asking us about a request.

## The HTTP status is the origin's status

When a target answers, we return **its** status rather than flattening everything to 200. A 404 from
the site is a 404 from us; a 418 is a 418. So `code` tells you what happened, and `errorCode` tells
you whose problem it is — which is the part that decides whether retrying could ever help.

## Codes

| errorCode | Typical status | Retrying helps? |
| - | - | - |
| `WEBSITE_BLOCKED` | 403 | No. A named antibot vendor refused us and the challenge was not solved. |
| `RATE_LIMITED` | 429 | Yes, later. `retryAfterSeconds` is included when the site tells us. Changing `country` often helps. |
| `ANTIBOT_NOT_SUPPORTED` | 422 | No, ever. We have no strategy for that vendor and did not send a request. Nothing was charged. |
| `UPSTREAM_STATUS` | the origin's | Depends on the site. The status is the site's own. |
| `NOT_FOUND` | 404 | No. The page does not exist. |
| `UPSTREAM_TIMEOUT` | 408 / 504 | Maybe. The origin did not answer in time. |
| `TIMEOUT` | 408 | Maybe. We ran out of the request budget with no refusal seen — try `POST /batch/scrape`, which has no response deadline. |
| `EMPTY_RESPONSE` | 200 | Maybe. The origin answered with nothing usable. |
| `SHED` | 504 | Yes. We dropped the job rather than start work that could not finish in your budget. |
| `PARSE_FAILED` | 500 | No. We fetched the page but could not parse it in the requested format. |
| `VALIDATION_FAILED` | 400 | No. Fix the request; `details` lists each problem. |
| `UNAUTHORIZED` | 401 | No. Check the API key. |
| `PAYMENT_REQUIRED` | 402 | No. Add credits. |
| `ROUTE_NOT_FOUND` | 404 | No. There is no such endpoint — distinct from `NOT_FOUND`, which is the target's 404. |
| `INTERNAL` | 500 | Yes. Our fault; nothing is charged for a faulted job. |

## A timeout and a block are different things

If a run saw a named vendor refuse us, you get `WEBSITE_BLOCKED` or `RATE_LIMITED` with the vendor
named — not `TIMEOUT` — even when the clock is what finally stopped it. That distinction matters
because `TIMEOUT` suggests more time would help and points you at the batch endpoint, and for a
blocked page it would not: the same page fails there too, just more slowly.

## Quota

Every response, success or failure, carries:

```
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 4821
X-RateLimit-Reset: 1794790000
X-Credits-Remaining: 4821
```

These are present on a `402` as well, which is the moment you most want to see them.


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