Skip to content

Commit

Permalink
fix: retry of query range
Browse files Browse the repository at this point in the history
  • Loading branch information
palashgdev committed Dec 11, 2023
1 parent 6dd34a7 commit 0a08969
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
retry(failureCount, error): boolean {
// only handling query range api retry
// @TODO remove this when all api is transformed into proper error handling
if (
error instanceof Error &&
error.message.includes('API responded with 400')
) {
return false;
}

return failureCount < 2;
},
},
},
});
Expand Down

0 comments on commit 0a08969

Please sign in to comment.