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

# 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

Location where the error was raised, for diagnostics.

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

#### Returns

`UnexpectedError`

## **Properties**

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