Open History to see the last commit
1---
2id: TanStackDBError
3title: TanStackDBError
4---
5
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7
8# Class: TanStackDBError
9
10Defined in: [packages/db/src/errors.ts:2](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L2)
11
12## Extends
13
14- `Error`
15
16## Extended by
17
18- [`NonRetriableError`](../nonretriableerror.md)
19- [`SchemaValidationError`](../schemavalidationerror.md)
20- [`CollectionConfigurationError`](../collectionconfigurationerror.md)
21- [`CollectionStateError`](../collectionstateerror.md)
22- [`CollectionOperationError`](../collectionoperationerror.md)
23- [`MissingHandlerError`](../missinghandlererror.md)
24- [`TransactionError`](../transactionerror.md)
25- [`QueryBuilderError`](../querybuildererror.md)
26- [`QueryCompilationError`](../querycompilationerror.md)
27- [`JoinError`](../joinerror.md)
28- [`GroupByError`](../groupbyerror.md)
29- [`StorageError`](../storageerror.md)
30- [`SyncCleanupError`](../synccleanuperror.md)
31- [`QueryOptimizerError`](../queryoptimizererror.md)
32
33## Constructors
34
35### new TanStackDBError()
36
37```ts
38new TanStackDBError(message): TanStackDBError
39```
40
41Defined in: [packages/db/src/errors.ts:3](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L3)
42
43#### Parameters
44
45##### message
46
47`string`
48
49#### Returns
50
51[`TanStackDBError`](../tanstackdberror.md)
52
53#### Overrides
54
55```ts
56Error.constructor
57```
58
59## Properties
60
61### cause?
62
63```ts
64optional cause: unknown;
65```
66
67Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es2022.error.d.ts:26
68
69#### Inherited from
70
71```ts
72Error.cause
73```
74
75***
76
77### message
78
79```ts
80message: string;
81```
82
83Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1077
84
85#### Inherited from
86
87```ts
88Error.message
89```
90
91***
92
93### name
94
95```ts
96name: string;
97```
98
99Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1076
100
101#### Inherited from
102
103```ts
104Error.name
105```
106
107***
108
109### stack?
110
111```ts
112optional stack: string;
113```
114
115Defined in: node\_modules/.pnpm/typescript@5.8.2/node\_modules/typescript/lib/lib.es5.d.ts:1078
116
117#### Inherited from
118
119```ts
120Error.stack
121```
122
123***
124
125### prepareStackTrace()?
126
127```ts
128static optional prepareStackTrace: (err, stackTraces) => any;
129```
130
131Defined in: node\_modules/.pnpm/@types+node@22.13.10/node\_modules/@types/node/globals.d.ts:143
132
133Optional override for formatting stack traces
134
135#### Parameters
136
137##### err
138
139`Error`
140
141##### stackTraces
142
143`CallSite`[]
144
145#### Returns
146
147`any`
148
149#### See
150
151https://v8.dev/docs/stack-trace-api#customizing-stack-traces
152
153#### Inherited from
154
155```ts
156Error.prepareStackTrace
157```
158
159***
160
161### stackTraceLimit
162
163```ts
164static stackTraceLimit: number;
165```
166
167Defined in: node\_modules/.pnpm/@types+node@22.13.10/node\_modules/@types/node/globals.d.ts:145
168
169#### Inherited from
170
171```ts
172Error.stackTraceLimit
173```
174
175## Methods
176
177### captureStackTrace()
178
179```ts
180static captureStackTrace(targetObject, constructorOpt?): void
181```
182
183Defined in: node\_modules/.pnpm/@types+node@22.13.10/node\_modules/@types/node/globals.d.ts:136
184
185Create .stack property on a target object
186
187#### Parameters
188
189##### targetObject
190
191`object`
192
193##### constructorOpt?
194
195`Function`
196
197#### Returns
198
199`void`
200
201#### Inherited from
202
203```ts
204Error.captureStackTrace
205```