Skip to content

Commit 2cf476d

Browse files
author
Maddie Clayton
authored
Merge pull request #6947 from hyonholee/errorfix
[Compute] Show target in error message
2 parents ef6ce56 + a2eea08 commit 2cf476d

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,6 +3308,9 @@ function Test-VirtualMachineWriteAcceleratorUpdate
33083308
$st = $vm1 | Update-AzureRmVM -OsDiskWriteAccelerator $true; } `
33093309
"not supported on disks with Write Accelerator enabled";
33103310

3311+
$output = $error | Out-String;
3312+
Assert-True {$output.Contains("Target");}
3313+
33113314
$st = $vm1 | Update-AzureRmVM -OsDiskWriteAccelerator $false;
33123315
}
33133316
finally

src/ResourceManager/Compute/Commands.Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Additional information about change #1
2020
-->
2121
## Current Release
22+
* Fixed the issue that target is missing in error output.
2223
* Fixed issue with storage account type for VM with managed disk
2324
* Fixed issue with default resource groups not being set.
2425
* Fix AEM Extension cmdlets for other environments, for example Azure China

src/ResourceManager/Compute/Commands.Compute/Common/ComputeCloudException.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ protected static string GetErrorMessageWithRequestIdInfo(Rest.Azure.CloudExcepti
5757
{
5858
sb.AppendLine().AppendFormat("ErrorCode: {0}", errorReturned.Error.Code);
5959
sb.AppendLine().AppendFormat("ErrorMessage: {0}", errorReturned.Error.Message);
60+
sb.AppendLine().AppendFormat("ErrorTarget: {0}", errorReturned.Error.Target);
6061
}
6162

6263
if (errorReturned.StartTime != null)

0 commit comments

Comments
 (0)