You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to optimization in openapi-fetch, it can return error responses in shape of {error: undefined, response}. React query handling code will ignore such errors, and will instead return a successful response.
Reproduction
Easy reproduction is to use a mutateAsync on an endpoint returning empty response with an error code.
try{awaitmutateAsync();// ensure it returns 4xx or 5xx with Content-Lenght 0console.log("This will execute");}catch{console.log("But this won't");}
Expected result
Promise is not resolved, and catch code will execute.