Unexpected behaviour with default option throwOnError: true
Hi,
First of all, thanks for the Angular adapter of tanstack query. Working with it is a delight so far
.
I do have a small issue that I can't explain or find a fix for. I'm experiencing weird behaviour when using the
Functionally I'd like to handle all query errors centralised by the Angular Error handler and, if necessary, handle custom errors per page. When navigating the first time to the page no alert is shown, but only when switching tabs the global error handler from Angular is triggered.
Why does my approach not work? Is there a setting I missed?
Kind regards,
Joep Kockelkorn
First of all, thanks for the Angular adapter of tanstack query. Working with it is a delight so far
I do have a small issue that I can't explain or find a fix for. I'm experiencing weird behaviour when using the
throwOnError: true setting as the default in the QueryClient options. A reproduction scenario can be found here: https://github.com/JoepKockelkorn/tanstack-angular-throw-on-error-bug.Functionally I'd like to handle all query errors centralised by the Angular Error handler and, if necessary, handle custom errors per page. When navigating the first time to the page no alert is shown, but only when switching tabs the global error handler from Angular is triggered.
Why does my approach not work? Is there a setting I missed?
Kind regards,
Joep Kockelkorn