-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
First of all: I love this library. ❤️
Current situation
Failed queryFns will be catched and then logged to the console with console.error.
Problem
I'm using react-query with React Native, which shows all console.error as a big red box in development mode. I expect that some of my requests can throw an error (e.g. if it's an 401 Unauthorized). But even if I'm expecting and handling those errors, they will appear as big red box because it has been logged with console.error.
I could also imagine that when I'm using react-query inside the browser, I maybe don't want errors to be logged to the console.
Current workaround
I'm currently overriding console.error to ignore all those errors. 🙈
Proposed solution
Maybe logging could be an opt-out? Or opt-in, like a global debug mode?
Metadata
Metadata
Assignees
Labels
No labels
