Skip to content

Error Reference

Every SDK error is a typed class carrying a stable code string:

typescript
interface SdkError {
  code: string;      // stable machine-readable identifier (branch on THIS)
  message: string;   // human display text; may be localized or reworded in any release
  retryable: boolean;// whether an identical retry may succeed
}

class NetworkError     extends Error implements SdkError { /* code: NETWORK_ERROR */ }
class TimeoutError     extends Error implements SdkError { /* code: TIMEOUT */ }
class RateLimitError   extends Error implements SdkError { /* retryAfterMs: number */ }
class UnauthorizedError extends Error implements SdkError { /* code: UNAUTHORIZED */ }
class ForbiddenError   extends Error implements SdkError { /* code: FORBIDDEN */ }
class SessionExpiredError extends Error implements SdkError { /* code: SESSION_EXPIRED */ }
class ServerError       extends Error implements SdkError { /* code: SERVER_ERROR */ }

message is for humans, code is for code. Never branch on message content; branch only on code or the error class. Messages may be localized or reworded in any release.

Common errors (all modules)

CodeError classHTTP statusTrigger conditionRetryableClient action
NETWORK_ERRORNetworkErrornone (no response)Connection failure, DNS, offlineYes (transport auto-retries idempotent requests first)Show offline state; retry on user action
TIMEOUTTimeoutErrornone (no response)Request exceeded the transport timeout (see Security § Transport Policy)YesRetry; persistent timeouts → show degraded state
RATE_LIMITEDRateLimitError429Rate limit or lockout exceeded; carries retryAfterMs (from Retry-After)After retryAfterMsDisable the action; surface wait time
TOO_MANY_ATTEMPTSTooManyAttemptsError429Per-surface attempt cap exceeded before a full lockout (auth 2FA codes, wallet deposit OTP codes)After retryAfterMsRefuse further attempts; surface wait time
UNAUTHORIZEDUnauthorizedError401Missing/expired access token AND refresh failed or was not attemptedNo (SDK already retried once)Route to login. This is the request-level rejection; the app-level session-expired event fires once alongside it
FORBIDDENForbiddenError403Authenticated but not permitted (e.g., KYC-gated action)NoShow permission state; never re-authenticate
SESSION_EXPIREDSessionExpiredErrornone (client-side)Refresh failed terminally (invalid/rotated/revoked token, family revocation, reuse detection); the app-level notification fires once per expiryNoFired with the session-expired event; return to login
SERVER_ERRORServerError500Server error with no recognized module code, surfaced after transport retriesYesShow error state; retry on user action

Transport-level behavior (timeouts, 5xx retry/backoff, 429 handling) is defined once in Security & Architecture § Transport Policy.

Module-specific errors

ModuleWhere
Auth & IdentityState & Security
Wallet & LedgerWallet Overview
GamesLaunching Games · Round History
Responsible GamingFinancial Limits · Self-Exclusion
MessagingInbox & Preferences
Engagementper engine page; see Engagement Overview
SupportLive Chat & Widgets
ContentDynamic Configuration
Analyticsdeliberately none: track() never throws and flush outcomes are internal (see Architecture & Batching)