File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1919-->
2020
2121## Upcoming Release
22-
22+ * Fixed an error when remove artifact throw ` ArgumentNullException `
2323## Version 3.2.1
2424* Fixed an error of not correctly setting the cmdlet context
2525
Original file line number Diff line number Diff line change @@ -239,10 +239,14 @@ public static Response Poll(this Operation operation)
239239 {
240240 var result = operation . WaitForCompletionResponseAsync ( ) . Result ;
241241 var responseContent = result . Content ;
242-
243- if ( responseContent ? . ToString ( ) != "{}" && responseContent ? . ToString ( ) . IsEmptyOrWhiteSpace ( ) == false )
244- {
245242
243+ //Fix when responseContent.length is 0 responseContent?.ToString() will throw exception ArgumentNullException
244+ if ( result . ContentStream == null || result . ContentStream . Length == 0 )
245+ {
246+ return result ;
247+ }
248+ else if ( responseContent ? . ToString ( ) != "{}" && responseContent ? . ToString ( ) . IsEmptyOrWhiteSpace ( ) == false )
249+ {
246250 throw new Exception ( responseContent ? . ToString ( ) ) ;
247251 }
248252 return result ;
You can’t perform that action at this time.
0 commit comments