Skip to content

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

Open
@Tridy

Description

@Tridy

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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions