Effect.retry for retrying failures
Use Effect.retry to retry a failed Effect. Combine it with Schedule to control how many times and with what backoff.
In the anti-pattern, we give up on first failure. In the Effect way, we retry with a policy.
- Use
Effect.retry(schedule)to retry on failure - Use
Schedule.recurs(n)to limit retries - Use
Schedule.exponentialfor backoff
Loading code editor...