Skip to content

Commit 43f1605

Browse files
author
Kamran Khan
committed
Report HTTP response contents in the exception
1 parent c438c77 commit 43f1605

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/SetAzureDiskEncryptionExtension.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ public override void ExecuteCmdlet()
469469

470470
if (!extensionPushResult.Response.IsSuccessStatusCode)
471471
{
472-
ThrowTerminatingError(new ErrorRecord(new ApplicationException(string.Format(CultureInfo.CurrentUICulture, "Installation failed for extension {0}", parameters.VirtualMachineExtensionType)),
472+
ThrowTerminatingError(new ErrorRecord(new ApplicationException(string.Format(CultureInfo.CurrentUICulture,
473+
"Installation failed for extension {0} with error {1}",
474+
parameters.VirtualMachineExtensionType,
475+
extensionPushResult.Response.Content.ReadAsStringAsync().GetAwaiter().GetResult())),
473476
"InvalidResult",
474477
ErrorCategory.InvalidResult,
475478
null));

0 commit comments

Comments
 (0)