Skip to main content

AbortSignal / Request Cancellation

All public methods accept an optional AbortSignal as their last parameter:
When cancelled, the SDK re-throws the native DOMException with name === 'AbortError':
The signal is also respected during retry backoff delays — if the signal fires while the SDK is waiting before a retry, the delay is cancelled immediately.

destroy()

Call destroy() when done to abort all in-flight requests and clear event handlers:
Pending promises reject with AbortError. After destroy(), maintenance event handlers are cleared.

Event Handler Cleanup

sdk.on() returns an unsubscribe function:

TypeScript Types