shouldRetry property

bool Function(Exception error)? shouldRetry
final

Optional callback to determine if a specific error should trigger a retry.

If null, all errors will trigger a retry (up to maxAttempts). Return true to retry, false to fail immediately.

Implementation

final bool Function(Exception error)? shouldRetry;