How Retry Logic Works
When a decorated method throws an error:
- The decorator catches the error
shouldRetry(error)decides whether the retry is allowed- A delay is applied
- The method is executed again
- This repeats until attempts are exhausted
If all attempts fail, the original error is rethrown.
Rebound supports:
- Fixed delays
- Exponential backoff
- Conditional retries
- Logging callbacks