{ "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 is503, 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 exampleoutlayerStatus,composioStatus).…_unreachableandengine_unavailable: no answer; details carryreason(timeoutor a network code such asECONNREFUSED).
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 arun.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.