Hi,
We already replaced all of lodash with es-toolkit and now came forward to replace other dependencies as well in order to have less dependencies.
One very reliable source that we use is https://github.com/vercel/async-retry.
The API is a little sluggish and out-dated.
One main feature of it is, that we can implemented our own waiting time after a response delivered a status code like 429.
The response has HTTP headers that tell how long to wait before trying again.
We are doing this in the main function itself, wait and rethrow. But it looks promising that we could do this within the delay option if the error would be available as parameter, just like it is in shouldRetry
So the delay depends on the thrown error from the original function.
Hi,
We already replaced all of lodash with es-toolkit and now came forward to replace other dependencies as well in order to have less dependencies.
One very reliable source that we use is https://github.com/vercel/async-retry.
The API is a little sluggish and out-dated.
One main feature of it is, that we can implemented our own waiting time after a response delivered a status code like 429.
The response has HTTP headers that tell how long to wait before trying again.
We are doing this in the main function itself, wait and rethrow. But it looks promising that we could do this within the
delayoption if the error would be available as parameter, just like it is inshouldRetrySo the delay depends on the thrown error from the original function.