Error hierarchy
Everything the SDK throws extendsCestoError. Server responses become typed APIError
subclasses; transport problems become connection errors. All classes are exposed on the
Cesto client for instanceof checks.
Every
APIError carries status, code, requestId, and details from the API, useful
when reporting an issue.
Automatic retries
Transient failures (408, 429, 5xx, connection errors, and timeouts) are retried automatically with exponential backoff and jitter, honoring theRetry-After header. Tune with maxRetries
(default 2), or disable per request with { maxRetries: 0 }.
A handful of non-idempotent methods are never retried automatically, regardless of
maxRetries: positions.submit (a submit that
timed out client-side may still have been accepted — poll getExecution instead of
re-sending), the consent-path open.start / close.start / rebalance.start, and
bridge.submitBurn / bridge.initiate.Timeouts & cancellation
Each request times out aftertimeout ms (default 60s), throwing APIConnectionTimeoutError.
Pass an AbortSignal to cancel a request yourself: