Skip to content

Commit

Permalink
ARO: Fail if resource doesn't exist on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
bennerv committed Jun 23, 2021
1 parent 8a1ea35 commit 6e5e639
Show file tree
Hide file tree
Showing 7 changed files with 4,716 additions and 5,735 deletions.
6 changes: 5 additions & 1 deletion src/azure-cli/azure/cli/command_modules/aro/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ def aro_delete(cmd, client, resource_group_name, resource_name, no_wait=False):

try:
oc = client.get(resource_group_name, resource_name)
except (CloudError, HttpOperationError) as e:
except CloudError as e:
if e.status_code == 404:
raise ResourceNotFoundError(e.message) from e
logger.info(e.message)
except HttpOperationError as e:
logger.info(e.message)

aad = AADManager(cmd.cli_ctx)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 6e5e639

Please sign in to comment.