Open kwill-MSFT opened 3 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @armleads-azure.
Author: | kwill-MSFT |
---|---|
Assignees: | - |
Labels: | `feature-request`, `Service Attention`, `ARM - Core` |
Milestone: | - |
Description of the new feature
All other Az Powershell cmdlets return the details of the REST API response in the error's InnerException property whenever an error is encountered. This makes it possible to do things such as:
But for the Management Group cmdlets such as New-AzManagementGroupSubscription, only the error message is returned to the caller so it isn't possible to query for things such as the code or details.
This is done in https://github.com/Azure/azure-powershell/blob/main/src/Resources/Resources/ManagementGroups/Common/Utility.cs with:
This should be changed to return the full error details the same way other Az cmdlets do.
Proposed implementation details (optional)