private static bool IsTransientInternal(Exception ex) { var storageErrorCodes = new[] { (int)Microsoft.WindowsAzure.StorageClient.StorageErrorCode.ServiceInternalError, (int)Microsoft.WindowsAzure.StorageClient.StorageErrorCode.ServiceTimeout }; var storageException = ex as Microsoft.WindowsAzure.StorageClient.StorageException; if (storageException != null) { if (storageErrorCodes.Contains((int)storageException.ErrorCode)) { return(true); } if (storageException.ExtendedErrorInformation != null) { if (TransientStorageErrorCodeStrings.Contains(storageException.ExtendedErrorInformation.ErrorCode)) { return(true); } } } return(false); }
private static bool IsTransientInternal(Exception ex) { var storageException = ex as Microsoft.WindowsAzure.Storage.StorageException; if (storageException != null) { var requestInfo = storageException.RequestInformation; if (requestInfo != null) { if (httpStatusCodes.Contains(storageException.RequestInformation.HttpStatusCode)) { return(true); } if (requestInfo.ExtendedErrorInformation != null && TransientStorageErrorCodeStrings.Contains(requestInfo.ExtendedErrorInformation.ErrorCode)) { return(true); } } } return(false); }