File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 18
18
- Additional information about change #1
19
19
-->
20
20
## Upcoming Release
21
+ * Show more error information when cmdlet failed with StorageException
22
+
23
+ ## Version 1.4.0
21
24
* Support Kind FileStorage and SkuName Premium_ZRS when create Storage account
22
25
- New-AzStorageAccount
23
26
* Clarified description of blob immutability cmdlet
Original file line number Diff line number Diff line change @@ -77,9 +77,28 @@ public static StorageException RepackStorageException(this StorageException e)
77
77
e . Message ,
78
78
e . RequestInformation . HttpStatusCode ,
79
79
e . RequestInformation . HttpStatusMessage ) ;
80
+
81
+ if ( e . RequestInformation . ExtendedErrorInformation != null )
82
+ {
83
+ String extendErrorInfo = String . Format (
84
+ "\n ErrorCode: {0}\n ErrorMessage: {1}" ,
85
+ e . RequestInformation . ExtendedErrorInformation . ErrorCode ,
86
+ e . RequestInformation . ExtendedErrorInformation . ErrorMessage ) ;
87
+
88
+ if ( e . RequestInformation . ExtendedErrorInformation . AdditionalDetails != null
89
+ && e . RequestInformation . ExtendedErrorInformation . AdditionalDetails . Count > 0 )
90
+ {
91
+ string additionalDetails = string . Empty ;
92
+ foreach ( var key in e . RequestInformation . ExtendedErrorInformation . AdditionalDetails )
93
+ {
94
+ additionalDetails += String . Format ( "\n {0}: {1}" , key . Key , key . Value ) ;
95
+ }
96
+ extendErrorInfo += additionalDetails ;
97
+ }
98
+ msg += extendErrorInfo ;
99
+ }
80
100
e = new StorageException ( e . RequestInformation , msg , e ) ;
81
101
}
82
-
83
102
return e ;
84
103
}
85
104
}
You can’t perform that action at this time.
0 commit comments