Node HTTP errors
The Node’s FastAPI error body is normally an object with a
detail field. The exact detail text is part of the source behavior for each endpoint and should not be parsed as a stable error code.
JSON-RPC gateway errors
The gateway returns JSON-RPC 2.0 error objects for malformed JSON (-32700), invalid JSON-RPC requests (-32600), and upstream failure. HTTP status is 400 for malformed/invalid requests and 502 when all upstream providers fail.
SDK errors
TsnHttpClient throws Error("TSN request failed (<status>): <body>") for a non-2xx response. Validation helpers in payment-authorization.ts, cross-chain.ts, and tins.ts throw ordinary JavaScript Error values with source-defined messages.
Minimal handling example
detail strings into invented codes.
Source: server.py:3500-3640, server.py:4009-4108, gateway.mjs:515-579, client.ts:22-62