[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Error](https://evolu.dev/docs/api-reference/common/Error) › UnknownError

Defined in: [packages/common/src/Error.ts:21](https://github.com/evoluhq/evolu/blob/a18269a1b822c670b507c6a9b73b23eed32551fe/packages/common/src/Error.ts#L21)

A wrapper for unknown errors caught at runtime.

When catching errors from unsafe code (third-party libraries, worker
boundaries, etc.), we wrap them in `UnknownError` so they can be used in
union types and distinguished from other error types.

The `error` property contains error details (including `message`, `stack`,
and `cause` if available), a string, or a fallback value.

Use [createUnknownError](https://evolu.dev/docs/api-reference/common/Error/functions/createUnknownError) to create instances.

## Extends

- [`InferType`](https://evolu.dev/docs/api-reference/common/Type/type-aliases/InferType)\<_typeof_ [`UnknownError`](https://evolu.dev/docs/api-reference/common/Error/variables/UnknownError)\>

## Properties

<a id="error"></a>

### error

```ts
error: unknown;
```

#### Inherited from

```ts
InferType.error;
```

---

<a id="type"></a>

### type

```ts
type: "UnknownError";
```

#### Inherited from

```ts
InferType.type;
```