Replies: 1 comment
-
you can't call |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to setup global error handling so that if a query or mutation errors out, it automatically tries to refetch the token. My code looks (simplified) like this:
But I get a
Error: No QueryClient set, use QueryClientProvider to set one
error because logoutMutation and refreshTokenMutation are instantiated before the QueryClientProvider is set (I think?).My guess is there is a simpler way to do this? Where am I going wrong?
Beta Was this translation helpful? Give feedback.
All reactions