Errors
This is the sandbox. It runs on testnets only. Never send real money or real tokens to an address or bank account the sandbox returns.
The sandbox is subject to the Beta Features section of our Terms of Use.
Sandbox errors use the same codes and shapes as production. A few behave differently:
- Dashboard fixes. The sandbox has no dashboard yet. Where a fix below says to use the dashboard, contact Agora instead.
direction_unsupportedis returned for any route pair outside the four the sandbox supports.route_creation_unavailablemeans the sandbox ran out of deposit addresses. It refills, so retry shortly.
Error response shape
Every error response shares a common JSON shape:
Every response — success or error — also includes a Request-Id header. Log it; Agora support uses it to trace requests end-to-end.
Error codes
Authentication failures (401)
A 401 unauthorized response carries a context.reason naming the specific cause, so clients can branch without parsing message:
See the Authentication guide for the full exchange and refresh flow.
Error context
Three codes attach a context object; all others omit it.
parameter_invalid returns a context.issues array describing each validation failure:
Illustrative example. The fields shown above are illustrative. The context.issues shape is stable across every endpoint that emits parameter_invalid.
unauthorized returns a context.reason — see Authentication failures above.
route_already_exists returns a context.routeId — the id of the pre-existing route. Route ids are deterministic, so you can use it directly (e.g. fetch the route via GET /v0/routes/{routeId}).
Handling errors programmatically
- Match on
code, never onmessage. Messages are human-readable and may change without notice. For401, branch oncontext.reason. - Use the HTTP status as a secondary filter. Status plus
codetogether fully disambiguate every error. - Persist the
Request-Idheader. It is the single best lever for diagnosing issues with Agora support. - Retry with backoff for
429,500, and503. HonorRetry-Afterwhen present. The503codes (route_creation_unavailable,service_unavailable) are transient and safe to retry.

