You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
React Query currently allows functions for dynamically updating retry count: retry: Boolean | Int | Function(failureCount, error) => shouldRetry | Boolean
I was wondering how one might handle dynamic retryDelay since that does not accept the error object: retryDelay: Function(retryAttempt: Int) => Int
We could maybe use useState with retry to update retryDelay but I'm not sure that's a good solution.
Would it be possible to allow something like: retryDelay: Function(retryAttempt: Int, error: TError) => Int?
I can see this being useful for handling 429s. It's probably not a very common use case but just wondering.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
React Query currently allows functions for dynamically updating retry count:
retry: Boolean | Int | Function(failureCount, error) => shouldRetry | Boolean
I was wondering how one might handle dynamic
retryDelay
since that does not accept the error object:retryDelay: Function(retryAttempt: Int) => Int
We could maybe use
useState
withretry
to updateretryDelay
but I'm not sure that's a good solution.Would it be possible to allow something like:
retryDelay: Function(retryAttempt: Int, error: TError) => Int
?I can see this being useful for handling 429s. It's probably not a very common use case but just wondering.
Beta Was this translation helpful? Give feedback.
All reactions