Deployment failed; but get RequestFailedException with bad response message #44008
Labels
ARM
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Mgmt
This issue is related to a management-plane library.
needs-team-attention
This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Library name and version
Azure.Core 1.39.0
Azure.ResourceManager 1.11.1
Azure.ResourceManager.Resources 1.7.2
Describe the bug
Try to create a spot VM using template deployment, it failed due to low spot price. In Azure activity log, it shows the reason as "
Unable to perform operation 'Create VM' since the provided max price '0.001 USD' is lower than the current spot price '0.0113 USD' for Azure Spot VM size 'Standard_D2ds_v5'.".
However in the exception message from SDK, it says:
"Azure.RequestFailedException: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Status: 200 (OK)
ErrorCode: DeploymentFailed
Service request succeeded. Response content and headers are not included to avoid logging sensitive data."
Why doesn't it include the actual failure message?
Expected behavior
Previously we get exception with message like:
Azure.RequestFailedException: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Status: 200 (OK)
ErrorCode: DeploymentFailed
Content:
{"status":"Failed","error":{"code":"DeploymentFailed","target":"/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.Resources/deployments/xxx","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"OperationNotAllowed","message":"Unable to perform operation 'Create VM' since the provided max price '0.001 USD' is lower than the current spot price '0.0113 USD' for Azure Spot VM size 'Standard_D2ds_v5'. For more information, see http://aka.ms/AzureSpot/errormessages."}]}}
Actual behavior
With Azure.Core 1.39.0, we get:
Azure.RequestFailedException: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.
Status: 200 (OK)
ErrorCode: DeploymentFailed
Service request succeeded. Response content and headers are not included to avoid logging sensitive data.
Reproduction Steps
at Azure.Core.OperationInternal
1.GetResponseFromState(OperationState
1 state)at Azure.Core.OperationInternal
1.<UpdateStatusAsync>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.Core.OperationInternalBase.<UpdateStatusAsync>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Azure.Core.OperationPoller.<WaitForCompletionAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.Operation.<WaitForCompletionResponseAsync>d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.ValueTask
1.get_Result()at Citrix.AzureFacade.AzureResourceManager.ClientWrappers.LongRunningOperationExtensions.d__0.MoveNext()
Environment
No response
The text was updated successfully, but these errors were encountered: