@@ -94,8 +94,8 @@ export class DevupQueryClient<S extends ConditionalKeys<DevupApiServers>> {
9494 signal,
9595 ...( options [ 0 ] as DevupApiRequestInit ) ,
9696 } )
97- . then ( ( { data, error } : DevupApiResponse < D , E > ) => {
98- if ( error ) throw error
97+ . then ( ( { data, error, isError } : DevupApiResponse < D , E > ) => {
98+ if ( isError ) throw error
9999 return data
100100 } ) ,
101101 ...options [ 1 ] ,
@@ -149,8 +149,8 @@ export class DevupQueryClient<S extends ConditionalKeys<DevupApiServers>> {
149149 // biome-ignore lint/suspicious/noExplicitAny: can't use method as a function
150150 ( this . api as any )
151151 [ mutationKey ?. [ 0 ] as string ] ( mutationKey ?. [ 1 ] as T , variables )
152- . then ( ( { data, error } : DevupApiResponse < D , E > ) => {
153- if ( error ) throw error
152+ . then ( ( { data, error, isError } : DevupApiResponse < D , E > ) => {
153+ if ( isError ) throw error
154154 return data
155155 } ) ,
156156 ...queryOptions ,
@@ -214,8 +214,8 @@ export class DevupQueryClient<S extends ConditionalKeys<DevupApiServers>> {
214214 signal,
215215 ...( options [ 0 ] as DevupApiRequestInit ) ,
216216 } )
217- . then ( ( { data, error } : DevupApiResponse < D , E > ) => {
218- if ( error ) throw error
217+ . then ( ( { data, error, isError } : DevupApiResponse < D , E > ) => {
218+ if ( isError ) throw error
219219 return data
220220 } ) ,
221221 ...options [ 1 ] ,
@@ -290,8 +290,8 @@ export class DevupQueryClient<S extends ConditionalKeys<DevupApiServers>> {
290290 } ,
291291 } as DevupApiRequestInit ,
292292 )
293- . then ( ( { data, error } : DevupApiResponse < D , E > ) => {
294- if ( error ) throw error
293+ . then ( ( { data, error, isError } : DevupApiResponse < D , E > ) => {
294+ if ( isError ) throw error
295295 return data as D
296296 } )
297297 } ,
@@ -366,8 +366,8 @@ export class DevupQueryClient<S extends ConditionalKeys<DevupApiServers>> {
366366 signal,
367367 ...( restOptions [ 0 ] as DevupApiRequestInit ) ,
368368 } )
369- . then ( ( { data, error } : DevupApiResponse < D , E > ) => {
370- if ( error ) throw error
369+ . then ( ( { data, error, isError } : DevupApiResponse < D , E > ) => {
370+ if ( isError ) throw error
371371 return data
372372 } ) ,
373373 ...queryOptions ,
0 commit comments