feat: skip retry for 401 error

This commit is contained in:
DIYgod 2024-07-30 23:05:16 +08:00
parent 6cd83efe05
commit 643de2a42e
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ const queryClient = new QueryClient({
retryDelay: 1000,
retry(failureCount, error) {
console.error(error)
if (error instanceof FetchError && error.statusCode === undefined) {
if (error instanceof FetchError && (error.statusCode === undefined || error.statusCode === 401)) {
return false
}