Open History to see the last commit
1---
2id: MissingUpdateArgumentError
3title: MissingUpdateArgumentError
4---
5
6# Class: MissingUpdateArgumentError
7
8Defined in: [packages/db/src/errors.ts:211](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L211)
9
10## Extends
11
12- [`CollectionOperationError`](CollectionOperationError.md)
13
14## Constructors
15
16### Constructor
17
18```ts
19new MissingUpdateArgumentError(): MissingUpdateArgumentError;
20```
21
22Defined in: [packages/db/src/errors.ts:212](https://github.com/TanStack/db/blob/main/packages/db/src/errors.ts#L212)
23
24#### Returns
25
26`MissingUpdateArgumentError`
27
28#### Overrides
29
30[`CollectionOperationError`](CollectionOperationError.md).[`constructor`](CollectionOperationError.md#constructor)
31
32## Properties
33
34### cause?
35
36```ts
37optional cause: unknown;
38```
39
40Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:26
41
42#### Inherited from
43
44[`CollectionOperationError`](CollectionOperationError.md).[`cause`](CollectionOperationError.md#cause)
45
46***
47
48### message
49
50```ts
51message: string;
52```
53
54Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1077
55
56#### Inherited from
57
58[`CollectionOperationError`](CollectionOperationError.md).[`message`](CollectionOperationError.md#message)
59
60***
61
62### name
63
64```ts
65name: string;
66```
67
68Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1076
69
70#### Inherited from
71
72[`CollectionOperationError`](CollectionOperationError.md).[`name`](CollectionOperationError.md#name)
73
74***
75
76### stack?
77
78```ts
79optional stack: string;
80```
81
82Defined in: node\_modules/.pnpm/typescript@5.9.3/node\_modules/typescript/lib/lib.es5.d.ts:1078
83
84#### Inherited from
85
86[`CollectionOperationError`](CollectionOperationError.md).[`stack`](CollectionOperationError.md#stack)
87
88***
89
90### stackTraceLimit
91
92```ts
93static stackTraceLimit: number;
94```
95
96Defined in: node\_modules/.pnpm/@types+node@25.2.2/node\_modules/@types/node/globals.d.ts:67
97
98The `Error.stackTraceLimit` property specifies the number of stack frames
99collected by a stack trace (whether generated by `new Error().stack` or
100`Error.captureStackTrace(obj)`).
101
102The default value is `10` but may be set to any valid JavaScript number. Changes
103will affect any stack trace captured _after_ the value has been changed.
104
105If set to a non-number value, or set to a negative number, stack traces will
106not capture any frames.
107
108#### Inherited from
109
110[`CollectionOperationError`](CollectionOperationError.md).[`stackTraceLimit`](CollectionOperationError.md#stacktracelimit)
111
112## Methods
113
114### captureStackTrace()
115
116```ts
117static captureStackTrace(targetObject, constructorOpt?): void;
118```
119
120Defined in: node\_modules/.pnpm/@types+node@25.2.2/node\_modules/@types/node/globals.d.ts:51
121
122Creates a `.stack` property on `targetObject`, which when accessed returns
123a string representing the location in the code at which
124`Error.captureStackTrace()` was called.
125
126```js
127const myObject = {};
128Error.captureStackTrace(myObject);
129myObject.stack; // Similar to `new Error().stack`
130```
131
132The first line of the trace will be prefixed with
133`${myObject.name}: ${myObject.message}`.
134
135The optional `constructorOpt` argument accepts a function. If given, all frames
136above `constructorOpt`, including `constructorOpt`, will be omitted from the
137generated stack trace.
138
139The `constructorOpt` argument is useful for hiding implementation
140details of error generation from the user. For instance:
141
142```js
143function a() {
144 b();
145}
146
147function b() {
148 c();
149}
150
151function c() {
152 // Create an error without stack trace to avoid calculating the stack trace twice.
153 const { stackTraceLimit } = Error;
154 Error.stackTraceLimit = 0;
155 const error = new Error();
156 Error.stackTraceLimit = stackTraceLimit;
157
158 // Capture the stack trace above function b
159 Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
160 throw error;
161}
162
163a();
164```
165
166#### Parameters
167
168##### targetObject
169
170`object`
171
172##### constructorOpt?
173
174`Function`
175
176#### Returns
177
178`void`
179
180#### Inherited from
181
182[`CollectionOperationError`](CollectionOperationError.md).[`captureStackTrace`](CollectionOperationError.md#capturestacktrace)
183
184***
185
186### prepareStackTrace()
187
188```ts
189static prepareStackTrace(err, stackTraces): any;
190```
191
192Defined in: node\_modules/.pnpm/@types+node@25.2.2/node\_modules/@types/node/globals.d.ts:55
193
194#### Parameters
195
196##### err
197
198`Error`
199
200##### stackTraces
201
202`CallSite`[]
203
204#### Returns
205
206`any`
207
208#### See
209
210https://v8.dev/docs/stack-trace-api#customizing-stack-traces
211
212#### Inherited from
213
214[`CollectionOperationError`](CollectionOperationError.md).[`prepareStackTrace`](CollectionOperationError.md#preparestacktrace)