How to Handle notFound() Globally Instead of Checking 404 in Each Loader?
Instead of checking for a 404 status and throwing the notFound() function in each loader separately, can I handle it in one place? For example, in the onError handler of React Query’s QueryCache or in an Axios response interceptor?
I’m trying to implement this as shown in the screenshots, but I’m still encountering an error, as you can see in the screenshots.
I’m trying to implement this as shown in the screenshots, but I’m still encountering an error, as you can see in the screenshots.


