<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0" />

StorageExceptionExtensions

Provide helpful information about errors calling Azure Storage endpoints.
using Azure.Core; namespace Azure.Storage { internal static class StorageExceptionExtensions { public static string GetErrorCode(this Response response, string errorCode) { if (string.IsNullOrEmpty(errorCode)) { ResponseHeaders headers = response.get_Headers(); headers.TryGetValue("x-ms-error-code", ref errorCode); } return errorCode; } public static bool IsUnavailable<T>(this Response<T> response) { return (response?.GetRawResponse().get_Status() ?? 0) == 304; } public static Response<T> AsNoBodyResponse<T>(this Response rawResponse) { return new NoBodyResponse<T>(rawResponse); } } }