> 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.

# UnexpectedError

> Catch-all for unexpected SDK errors.

Catch-all wrapper used when the SDK encounters a condition that doesn't map to one of the typed error classes. The `at` property records where the wrap occurred and `options.cause` (standard `ErrorOptions`) carries the original throwable. Treat this as a bug signal — any occurrence merits filing an issue with the `at` value and the underlying cause attached.

## **Extends**

* `Error`

## **Constructors**

### Constructor

```ts
new UnexpectedError(at?, options?): UnexpectedError
```

#### Parameters

**`at`** `string`

Location where the error was raised, for diagnostics.

---

**`options`** `ErrorOptions`

Standard `ErrorOptions` (e.g. `cause`).

---

#### Returns

`UnexpectedError`

## **Properties**

**`at`** `string`

Location where the error was raised, for diagnostics.

---

## **Examples**

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

client.errors$.subscribe((err) => {
  if (err instanceof UnexpectedError) {
    console.error(`unexpected error at ${err.at}:`, err.cause);
    reportToTelemetry(err);
  }
});
```