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