Catching thrown errors from queries
This client blows up the entire application when I return a throw error from a query. Error bound has been suggested, but what I want is not to kill a component or the entire tree, but just print the error message in toast. I don't want to break the UI. For example, we can catch an error related to onError in the config we give to the provider with the Tanstack query.
It is somewhat easy to log the error message with try catch for mutations, but I could not find a way for queries.
How can I achieve this?
I showed the sample model in the picture.

