From 643de2a42e077eff61586a8b252b22694e46a9ce Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 30 Jul 2024 23:05:16 +0800 Subject: [PATCH] feat: skip retry for 401 error --- src/renderer/src/lib/query-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/lib/query-client.ts b/src/renderer/src/lib/query-client.ts index fc454398f0..2724f9915e 100644 --- a/src/renderer/src/lib/query-client.ts +++ b/src/renderer/src/lib/query-client.ts @@ -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 }