Info
| Version: | 1.0.0 | 
| Author(s): | Dogu Arslan | 
| Last Update: | Wednesday, January 27, 2016 | 
| .NET Fiddle: | Create the first Fiddle | 
| NuGet Url: | https://www.nuget.org/packages/AzureStorageExceptionParser | 
Install
Install-Package AzureStorageExceptionParser
                        dotnet add package AzureStorageExceptionParser
                        paket add AzureStorageExceptionParser
                        
                                AzureStorageExceptionParser Download (Unzip the "nupkg" after downloading)
                            
                        Dependencies
- WindowsAzure.Storage(>= 4.3.0)
 
Tags
                
Provides StorageException extension methods to extract:
- ErrorCode
- ETag
- ExtendedErrorMessage
- FailedOperationIndex (of a failed Batch Operation)
- HttpStatusCode
- OperationStartTime (UTC)
- OperationEndTime (UTC)
- RequestDate (UTC)
- RequestId
- TargetLocation (Primary, Secondary, etc.)
- IsOptimisticConcurrencyFailure
And extended ToString() method which automatically extracts this information from the exception instance and converts it into a string for logging purposes.
Usage:
Try
{
//Make a request to Azure Table Storage (Blob, Table, Queue, ..)
}
catch (StorageException storageException)
{
//Gives you the HttpStatusCode embedded inside the StorageException
int? httpStatusCode = storageException.GetHttpStatusCode();
// Gives you the index of the failed operation in a azure table batch operation
int failedOperationIndex = storageException.GetFailedOperationIndex();
}
.