Errors

Error shapes and the status codes Wire returns.

Wire uses standard HTTP status codes and a consistent error body.

Error shape

{ "status": "error", "error": { "code": "INVALID_PARAMS", "message": "query is required" } }

Status codes

CodeMeaning
400Invalid request: missing or malformed params.
401Missing or invalid API key.
402Out of credits.
403The action requires an identity you haven't connected, or your plan doesn't allow it.
404Unknown action_id or job.
429Rate limit exceeded; see Rate limits.
5xxWire or an upstream site had a problem. Safe to retry with backoff.

Job-level failures

A task can be accepted (200) and still fail at run time, for example, if the upstream site blocked the request. In that case the job returns status: "failed" with an error, and no credits are charged.

{ "job_id": "job_a8f3c2", "status": "failed",
  "error": { "code": "UPSTREAM_BLOCKED", "message": "site returned a challenge" } }

Retries

429 and 5xx are safe to retry with exponential backoff. 4xx errors other than 429 indicate a problem with the request and will fail again unchanged.