Skip to main content
All errors are returned as JSON with a consistent shape.

Error format

message is a string for a single error. When validation fails it can be an array of strings:

Status codes

Authentication errors

A 401 from a protected endpoint means the access token is missing or expired. Recover by calling POST /v1/auth/refresh. If refresh itself returns 401, the session is unrecoverable and the user must sign in again.

Rate limits

Auth endpoints are rate limited to protect against brute force: Exceeding a limit returns 429. Clients should back off and retry.

Fiat errors

Fiat endpoints return the same JSON shape, but the SDK fiat methods throw (a plain Error whose message is the server message) instead of returning the T | ApiError union that auth/wallet reads use. Handle them with try/catch:
Common fiat statuses: 400 (bad amount / net too small), 401 (no session), 404 (unknown recipient / transaction), 503 (ledger disabled or frozen).

SDK popup errors

Trust-critical SDK calls in popup mode throw instead of returning unions: A closed or timed-out popup never resolves — treat it as rejected.