Function to determine if a request should be retried
final bool Function(Exception exception, int retryCount) shouldRetry;