Open History to see the last commit
1---
2id: toBoundaryError
3title: toBoundaryError
4---
5
6```ts
7function toBoundaryError(cause): Error;
8```
9
10Defined in: [packages/db/src/live-query-observer.ts:815](https://github.com/TanStack/db/blob/main/packages/db/src/live-query-observer.ts#L815)
11
12**`Internal`**
13
14The Error an adapter sends to an error boundary for a failed first load or
15a crash: the cause itself when it is an Error, otherwise an Error with the
16problem's message (as in `health.error.message`) whose `cause` is the value
17the sync adapter reported.
18
19 Shared by TanStack DB's official framework adapters.
20
21## Parameters
22
23### cause
24
25`unknown`
26
27## Returns
28
29`Error`