Skip to content

Map error in useQuery and useMutation #8630

Answered by TkDodo
V1OL3TF0X asked this question in Ideas
Discussion options

You must be logged in to vote

add try/catch inside the queryFn / mutationFn and only re-throw the error you want after you’ve handled it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@V1OL3TF0X
Comment options

Answer selected by V1OL3TF0X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants