softonic / axios-retry

Axios plugin that intercepts failed requests and retries them whenever possible
Other
1.9k stars 167 forks source link

Number of retries depending on the type of error #287

Open astoff opened 1 month ago

astoff commented 1 month ago

I would like to compute number of retries dynamically, depending on details about the error. I guess this can be done by setting retries to a large number and then throwing an error in the retryDelay function but I'm not sure about the implications.

Do you have a recommendation? (Do / don't do that, what is a suitable error, etc.)