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