Skip to content

Commit

Permalink
feat: skip retry for 401 error
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jul 30, 2024
1 parent 6cd83ef commit 643de2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/src/lib/query-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 643de2a

Please sign in to comment.