File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -291,11 +291,10 @@ export const qErrorsAllowed = <Params, Data>(
291291 // not want to share the cache and mix them up
292292 queryKey : [ f . name , params , ERRORS_ALLOWED ] ,
293293 queryFn : ( ) => f ( params ) . then ( handleResult ( f . name ) ) ,
294- // In the case of 404s, let the error bubble up to the error boundary so
295- // we can say Not Found. If you need to allow a 404 and want it to show
296- // up as `error` state instead, pass `throwOnError: false` as an
297- // option from the calling component and it will override this
298- throwOnError : ( err ) => err . statusCode === 404 ,
294+ // No point having throwOnError because errors do not throw. Worth
295+ // considering still throwing for particular errors: sometimes we expect
296+ // a 403, other times we expect 404s. We could take a list of acceptable
297+ // status codes.
299298 ...options ,
300299 } )
301300
You can’t perform that action at this time.
0 commit comments