> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# RecoveryError

> Error thrown when a recovery attempt fails.

Raised when the SDK's automatic call-recovery flow fails — for example, after a transient signaling disconnect that exceeds [`maxRecoveryAttempts`](/docs/browser-sdk/v4/reference/client-preferences/max-recovery-attempts). 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

```ts
new RecoveryError(action, attempt, originalError?): RecoveryError
```

### Parameters

Recovery action being attempted when the error was raised.

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

Underlying error that caused the recovery attempt to fail.

## **Properties**

Recovery action being attempted when the error was raised.

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

Underlying error that caused the recovery attempt to fail.

## **Examples**

```ts
import { RecoveryError } from '@signalwire/js';

call.errors$.subscribe((err) => {
  if (err instanceof RecoveryError) {
    console.error(`recovery action ${err.action} failed on attempt ${err.attempt}`);
    teardownCallUI();
  }
});
```