Automatic token refrehs for mutation error.
This commit is contained in:
parent
4ea3c86522
commit
4d383c6fc8
@ -49,6 +49,13 @@ const AuthAwareQueryClientProvider = ({ children }: React.PropsWithChildren) =>
|
||||
() =>
|
||||
new QueryClient({
|
||||
defaultOptions: {
|
||||
mutations: {
|
||||
onError(error) {
|
||||
if (error instanceof ExpiredTokenError) {
|
||||
doRefresh()
|
||||
}
|
||||
}
|
||||
},
|
||||
queries: {
|
||||
retry(failureCount, error) {
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user