async-retry
async-retry copied to clipboard
make sure that the underlying retry operation is stopped on bail
If you use bail()
to force rejection of the promise, I noticed that if you also still rejected it (by throwing an error) the underlying retries still happened.
This prevents any further retries if the promise is still rejected after the bail call.