protected override bool CanRetrySqlException(SqlException sqlException) { // Enumerate through all errors found in the exception. foreach (SqlError err in sqlException.Errors) { RetryPolicyUtils.AppendThrottlingDataIfIsThrottlingError(sqlException, err); if (RetryPolicyUtils.IsNonRetryableDataTransferError(err.Number)) { Logger.Write(TraceEventType.Error, string.Format(Resources.ExceptionCannotBeRetried, err.Number, err.Message)); return(false); } } // Default is to treat all SqlException as retriable. return(true); }