Skip to main content
SDK calls throw ApiError — a transport-layer wrapper around the response returned by the WalletSuite API. The wrapper carries the HTTP call metadata (URL, method, status, retry attempt). The canonical error contract — category, code, message, requiredAction — is documented in Structured Errors. Parse err.bodySnippet as JSON to reach it.

ApiError fields

Reading the structured error

Wrap every SDK call in try / catch. Check err.bodySnippet for the structured payload when the server responded:
See Structured Errors → From the SDK for a switch on category that covers every recovery path.

Transport-level failures

When err.status is undefined, the request never reached the server. Common causes:
  • Network timeout
  • DNS resolution failure
  • ECONNREFUSED from a local proxy
  • TLS handshake error
In this case err.bodySnippet is also undefined and there is no structured payload to parse — the retry policy should treat it like an upstream category error (retry with backoff, then surface to the user).

Debug logging

Enable debug: true during development to log request and response details to stdout:
Never leave debug: true enabled in production — logs may include URLs that carry sensitive path parameters.