The Error Envelope
Non-2xx responses always return this object:error is a human-readable message, code is the stable machine-readable identifier to branch on, and details carries field-level messages on validation failures and is null otherwise.
API Error Codes
claims.statuses avoids the problem entirely: campaigns without a published root report claimable: 0n instead of erroring.
SDK Error Classes
All SDK errors extendTbiError and carry a code.
Branch on the class, not the message:
Wallet write failures are not wrapped. A user rejecting the transaction, an out-of-gas error, or a contract revert propagates straight from your wallet client, so you can surface the wallet’s own message. See Contracts for the revert selectors.
What Retries Automatically
The SDK retries network errors, HTTP 429, and HTTP 5xx with exponential backoff ofbaseDelayMs * 2^(attempt - 1), defaulting to 3 total attempts and a 200 ms base. Other 4xx responses and aborted requests are never retried, because retrying them cannot succeed.
AbortSignal on any read method to cancel in-flight requests. A cancelled request is never retried:
Contract Reverts
Once a claim transaction is submitted, failures come from the TBI Manager contract rather than the API. 📜Revert selectorsInvalidProof, NothingToClaim, ClaimExpired, and the rest, with the cause of each.
Keep Exploring
Data Conventions
Wire formats, pagination, caching, and rate limits.
Claim Rewards
The claim flow end to end, including simulating before you sign.