Custom function to calculate retry delay based on attempt and error.
final RetryDelayFn? retryDelayFn;