retry function should also pass data #1281
Replies: 1 comment 3 replies
-
This sounds more like you want the As far as I know, retries only happen when there is an error. Otherwise, the default of "3 retries" would not really work. So if you want to use that, you would need to produce a failed promise somehow so that react-query can retry. You can either have your backend send a status code that produces an error, or you Passing data wouldn't solve this, because |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Many API's work as a job system that require querying until a status changes to a state that's not in progress. The best way to support this would be through the query
retry
as it already supports back off delay and such. The problem isretry
only passes infailureCount
anderror
. Havingdata
passed into this function would be immensely helpful as we could then do something like this (assuming the API returns astatus
key)Beta Was this translation helpful? Give feedback.
All reactions