Execute an async function with retry and exponential backoff.
Retries up to policy.maxRetries times with capped exponential delay: min(baseDelayMs * 2^attempt, maxDelayMs).
policy.maxRetries
min(baseDelayMs * 2^attempt, maxDelayMs)
Async factory that performs the operation
Retry configuration (merged with defaults)
Result of fn on first success
fn
The last error when all retries are exhausted
Execute an async function with retry and exponential backoff.
Retries up to
policy.maxRetriestimes with capped exponential delay:min(baseDelayMs * 2^attempt, maxDelayMs).