Skip to main content
Every error is JSON: { "error": "<code>", ...details } with an HTTP status. The error code is stable; details depend on the code.

Status codes

Why 503 and never 502

When OutLayer, Composio, the engine or the NEAR RPC fails, the answer is 503, never 502. Behind Cloudflare a 502 or 504 body is replaced by Cloudflare’s own HTML page, so the caller would lose the error. Two families:
  • …_error: the service answered with a failure; details carry its status (for example outlayerStatus, composioStatus).
  • …_unreachable and engine_unavailable: no answer; details carry reason (timeout or a network code such as ECONNREFUSED).
Every 5xx is logged on the server as one line with the route, code and details, never keys.

Payment results

A payment refused by the wallet is not an HTTP error of your request; it is the tool’s result inside the run: Never show a transaction link, or “rejected on-chain”, for a refused payment.

Run errors

A run that fails sends a run.error event with a code, for example run_interrupted when a backend restarted mid-run. See Streaming events. The full list of codes per route is in docs/api-contract.md §7.