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