Javascript – How to handle error with react-query, without triggering "unhandledrejection" event
I'm using onError callback funtion in useMutation. It is only triggered, when foo() throws. const mutation = useMutation({ mutationFn: foo(), onError: () => { console.log("error caught by onError"); } }) I also have a listener on unhandledrejection event, that triggers…