When a tool fails, it returns a text result beginning with Error: and sets isError: true, so the agent can tell a failure from data. Upstream HTTP statuses are mapped to human-readable messages; the API's own message or error field is appended after a dash when present.

Mapped statuses

  • Bad Request (400): the request body is invalid — a rule violation upstream: POST in browser mode, capture_options without capture_network, an empty url_filter, a body over 64 KB. Do not retry; fix the call.
  • Unauthorized (401): the API key is missing or invalid — wrong or revoked apiKey. Do not retry.
  • Payment Required (402): insufficient JetScrape credits — the account balance is exhausted. Do not retry; the user must top up.
  • Forbidden (403): the URL is blacklisted or access is denied — the target is blocked, or the resource belongs to another account.
  • Not Found (404): the requested resource does not exist — wrong flow, node, config or routine id.
  • Conflict (409): the resource already exists — typically create_template on a config that is already a template.
  • Gateway Timeout (504): the upstream service did not respond in time — a background microservice call ran long, most often on template endpoints. Retry once or twice.
  • JetScrape request failed (<status>) — any other status, including 500, 502 and 503. Retry with backoff.

Examples

Error: Unauthorized (401): the API key is missing or invalid — Unauthorized
Error: Payment Required (402): insufficient JetScrape credits — Insufficient credits
Error: Bad Request (400): the request body is invalid — capture_network requires mode browser
Error: Conflict (409): the resource already exists — template already exists for config 4412

Network errors

When the MCP server cannot reach the JetScrape API at all, the message is Network error contacting JetScrape at <url>: <reason> with status 0. This is transient; retry after a short delay. Each upstream request is also bounded by a 10-minute timeout.

Validation errors

Arguments are validated against the tool's schema before anything is sent upstream. A wrong enum value, a missing required field or a malformed URL is rejected by the MCP layer with a validation message naming the field. These never cost credits.

Soft errors inside a successful result

Some tools return a normal result that contains an error field instead of failing, because the situation is expected:

  • read_captured_response when the dispatch has no captured entries, or index is out of range.
  • discover_api_endpoints when nothing matched; endpoints is empty and hint explains what to try.

Retry policy

  • 500, 502, 503, 504, network errors — retry with exponential backoff, at most three times.
  • 400, 401, 402, 403, 404, 409, validation errors — do not retry; fix the call or the account.
  • Scrapes already retry internally as many times as options.retry_count allows.

The most expensive failure is not on this page. A scrape whose selectors match nothing returns no error at all. See Reading Diagnostics.

Last updated: September 22, 2026