Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

[Feature]: Give adequate response for Restore-AzApiManagement errors (compared to CLI) #25072

Open Tridy opened 5 months ago

Tridy commented 5 months ago

Description of the new feature

when I try restoring through Restore-AzApiManagement, I get:

Restore-AzApiManagement: ...restrore_from_backup.ps1:52:1
Line |
  52 |  Restore-AzApiManagement -ResourceGroupName $apiManagementResourceGrou …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Long running operation failed with status 'BadRequest'.

when I do the same through az cli, Iget:

(RestoreFailed) Cannot restore: current SKU is 'StandardV2', backup SKU is 'Standard'
Code: RestoreFailed
Message: Cannot restore: current SKU is 'StandardV2', backup SKU is 'Standard'

Proposed implementation details (optional)

the error from PowerShell should also give the message about: Message: Cannot restore: current SKU is 'StandardV2', backup SKU is 'Standard'.

microsoft-github-policy-service[bot] commented 5 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @solankisamir, @mikebudzynski, @KedarJoshi, @yingru97.

microsoft-github-policy-service[bot] commented 5 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @solankisamir, @mikebudzynski, @KedarJoshi, @yingru97.