Skip to main content
Errors always come back in the same envelope:
Branch on code — it’s the stable machine-readable handle. message is human-readable but English-only; the API doesn’t localize. detail is operation-specific context (which session, which scope, which state) for diagnostics, not a user-facing string. The HTTP statusCode correlates with the family but isn’t the contract — multiple codes can share a status (403 covers NOT_AUTHORIZED, NOT_OPERATOR, NOT_YOUR_SESSION).

How to handle them

Auth + authorization

Domain rules

Wallet + settlement

Not-found

Infrastructure (5xx)

These mean our side is sad, not yours. Safe to retry with backoff.

Versioning + new codes

Codes are append-only — once shipped, a code keeps its meaning. New ones may appear; if you switch on code, fall through to a generic handler for the default case (don’t crash on unknown codes).
See @luxxon/sdk’s LuxxonErrorCode type for the typed enum — it tracks this page.