> This page is for Browser SDK, version v4 (default).
> For other versions, use one of these documentation indexes:
> - v4 (default): https://signalwire.com/docs/browser-sdk/v4/llms.txt
> - v3: https://signalwire.com/docs/browser-sdk/v3/llms.txt
> - v2: https://signalwire.com/docs/browser-sdk/v2/llms.txt

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# 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

**`action`** `string` — required

Recovery action being attempted when the error was raised.

---

**`attempt`** `number` — required

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

---

**`originalError`** `unknown`

Underlying error that caused the recovery attempt to fail.

---

## **Properties**

**`action`** `string` — required

Recovery action being attempted when the error was raised.

---

**`attempt`** `number` — required

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

---

**`originalError`** `unknown`

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();
  }
});
```