# x402/HTTP Error Decoder

> x402/HTTP Error Decoder is a paid API for AI agents from code-toll-production.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-24).

Decodes x402 and HTTP error codes into structured recovery instructions including meaning, recommended action, retry strategy, backoff, and fix.

## Facts

- Endpoint: POST https://code-toll-production.up.railway.app/decode-error?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-http-error-decoder-c77111e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ltoPYJxPA_oCwySuetpF7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-http-error-decoder-c77111e4 -d '<json body>'
```

Example prompt: I got a 402 status code back from an API call — can you decode what that means and give me the exact steps to recover, including whether I should retry and how long to wait?

## When to prefer this

Use this endpoint when your agent encounters x402 or HTTP errors and needs structured, actionable recovery instructions rather than raw documentation lookup. Especially valuable in agentic workflows using the x402 payment protocol where automated retry and backoff logic needs to be derived from error responses.

## Known failure modes

- Missing or invalid status field returns a 400 bad request error
- Unrecognized error codes may return a generic or null fix
- Service unavailability on Railway hosting may cause 502/503 responses
- Malformed JSON body causes parsing failure

## How this service works

Decode any x402/HTTP error into structured recovery instructions. POST /decode-error {"status": 402} or {"status": "timeout"}. Returns meaning, action, retries, backoff, and fix.

## Output

Returns a structured JSON object containing: the human-readable meaning of the error, a recommended action to take, retry count guidance, backoff strategy, and a concrete fix description to resolve the issue.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-http-error-decoder-c77111e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from code-toll-production.up.railway.app](https://www.zero.xyz/host/code-toll-production.up.railway.app/llms.txt)
