Calls attempt again while shouldRetry holds, up to maxAttempts calls in all, waiting delayMs between them. It decides on the returned value, so pair it with safe() rather than throwing.
attempt
shouldRetry
maxAttempts
delayMs
safe()
Calls
attemptagain whileshouldRetryholds, up tomaxAttemptscalls in all, waitingdelayMsbetween them. It decides on the returned value, so pair it withsafe()rather than throwing.