mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(web): infinitely retry queries, remove ago
from age cells (#528)
- infinitely retry web queries so we avoid the "failed to fetch" error when the web server is unavailable - remove the "ago" suffix from age cells (closes #497)
This commit is contained in:
parent
b6ba23d0ee
commit
1b6fd01575
2 changed files with 8 additions and 2 deletions
|
@ -10,7 +10,13 @@ import Toast from "./components/notifications/Toast";
|
|||
|
||||
export const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: { useErrorBoundary: true },
|
||||
queries: {
|
||||
// The retries will have exponential delay.
|
||||
// See https://tanstack.com/query/v4/docs/guides/query-retries#retry-delay
|
||||
// delay = Math.min(1000 * 2 ** attemptIndex, 30000)
|
||||
retry: true,
|
||||
useErrorBoundary: true
|
||||
},
|
||||
mutations: {
|
||||
onError: (error) => {
|
||||
// Use a format string to convert the error object to a proper string without much hassle.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue