Add config to prevent log rejections in the console #1292
-
Hello, When I was testing react-query, I was a little confused to find out what was firing a log (from my Promise.reject) in the console, despite the one that fetch already do. Then I realised that the react-query logs rejections by default. Would it be interesting to put a configuration to prevent it being logged in the browser? I say this thinking about applications that have error tracking and that may or may not not want everything to be logged into the console by default (since fetch already logs - but don't throws - request errors). My code as example:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@bruno-vinicius You can set a custom logger for general logs, warnings and errors: See docs on custom logger. |
Beta Was this translation helpful? Give feedback.
@bruno-vinicius You can set a custom logger for general logs, warnings and errors: See docs on custom logger.