RecoveryError

View as MarkdownOpen in Claude

Raised when the SDK’s automatic call-recovery flow fails — for example, after a transient signaling disconnect that exceeds maxRecoveryAttempts. The action and attempt properties identify which recovery step gave up. When this fires the call has transitioned to failed; clean up UI and notify the user.

Extends

  • Error

Constructors

Constructor

1new RecoveryError(action, attempt, originalError?): RecoveryError

Parameters

action
stringRequired

Recovery action being attempted when the error was raised.

attempt
numberRequired

Recovery attempt number (1-based) at the time of failure.

originalError
unknown

Underlying error that caused the recovery attempt to fail.

Properties

action
stringRequired

Recovery action being attempted when the error was raised.

attempt
numberRequired

Recovery attempt number (1-based) at the time of failure.

originalError
unknown

Underlying error that caused the recovery attempt to fail.

Examples

1import { RecoveryError } from '@signalwire/js';
2
3call.errors$.subscribe((err) => {
4 if (err instanceof RecoveryError) {
5 console.error(`recovery action ${err.action} failed on attempt ${err.attempt}`);
6 teardownCallUI();
7 }
8});