Skip to content

Commit

Permalink
Relax error message match
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain-S committed Sep 7, 2023
1 parent e6f9b7a commit 5159c68
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions controller_function/controller/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ def disable_subscription(subscription_id: UUID) -> None:
try:
SUBSCRIPTION_CLIENT.subscription.cancel(str(subscription_id))
except azure_exceptions.HttpResponseError as e:
is_disabled = (
"Subscription is not in active state and is hence marked as read-only"
in e.error.message
)
is_disabled = "Subscription is not in active state" in e.error.message

# It's fine if we can't disable it because it is already inactive.
if is_disabled:
Expand Down

0 comments on commit 5159c68

Please sign in to comment.