UMANTHIR

JavaScript / TypeScript

Timeouts, retries and cancellation

  • Each attempt has a timeout (timeout, 30 s by default).
  • GET requests are retried after a network error, 429, 502, 503 or 520, up to maxRetries (2), with exponential backoff and jitter. A Retry-After from the API is honored when it is up to 30 s; longer waits are not retried and surface as the error, with retryAfter set.
  • POST (tools.splitHunt) is never retried.
  • Pass an AbortSignal to cancel a call, including any pending retry:
ts
const controller = new AbortController();
setTimeout(() => controller.abort(), 5_000);
await client.highscores.list({}, { signal: controller.signal, maxRetries: 0 });

Next: API keys.

Cookies

Session, language and theme use necessary cookies and stay on. Usage tagging, such as visit analytics or advertising, starts only if you allow it.

Manage cookies

Session, language and theme use necessary cookies and stay on. Usage tagging, such as visit analytics or advertising, starts only if you allow it.