File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
packages/router-ssr-query-core/src Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -133,31 +133,26 @@ export function setupCoreRouterSsrQueryIntegration<TRouter extends AnyRouter>({
133
133
const ogMutationCacheConfig = queryClient . getMutationCache ( ) . config
134
134
queryClient . getMutationCache ( ) . config = {
135
135
...ogMutationCacheConfig ,
136
- onError : ( error , _variables , _context , _mutation ) => {
136
+ onError : ( error , ... rest ) => {
137
137
if ( isRedirect ( error ) ) {
138
138
error . options . _fromLocation = router . state . location
139
139
return router . navigate ( router . resolveRedirect ( error ) . options )
140
140
}
141
141
142
- return ogMutationCacheConfig . onError ?.(
143
- error ,
144
- _variables ,
145
- _context ,
146
- _mutation ,
147
- )
142
+ return ogMutationCacheConfig . onError ?.( error , ...rest )
148
143
} ,
149
144
}
150
145
151
146
const ogQueryCacheConfig = queryClient . getQueryCache ( ) . config
152
147
queryClient . getQueryCache ( ) . config = {
153
148
...ogQueryCacheConfig ,
154
- onError : ( error , _query ) => {
149
+ onError : ( error , ... rest ) => {
155
150
if ( isRedirect ( error ) ) {
156
151
error . options . _fromLocation = router . state . location
157
152
return router . navigate ( router . resolveRedirect ( error ) . options )
158
153
}
159
154
160
- return ogQueryCacheConfig . onError ?.( error , _query )
155
+ return ogQueryCacheConfig . onError ?.( error , ... rest )
161
156
} ,
162
157
}
163
158
}
You can’t perform that action at this time.
0 commit comments