Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[azure][fix]: Ignore errors from Azure side #2263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/azure/fix_plugin_azure/resource/cosmosdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,7 @@ class AzureCosmosDBLocation(CosmosDBLocationSetter, MicrosoftResource, PhantomBa
query_parameters=["api-version"],
access_path="value",
expect_array=True,
expected_error_codes={"Internal Server Error": None},
)
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("id"),
Expand Down
1 change: 1 addition & 0 deletions plugins/azure/fix_plugin_azure/resource/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ class AzureMonitorAlertRule(MicrosoftResource):
query_parameters=["api-version"],
access_path="value",
expect_array=True,
expected_error_codes={"InvalidResourceType": None},
)
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("id"),
Expand Down
1 change: 1 addition & 0 deletions plugins/azure/fix_plugin_azure/resource/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -6771,6 +6771,7 @@ class AzureNetworkDNSZone(MicrosoftResource, BaseDNSZone):
query_parameters=["api-version"],
access_path="value",
expect_array=True,
expected_error_codes={"BadRequest": None},
)
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("id"),
Expand Down
3 changes: 2 additions & 1 deletion plugins/azure/fix_plugin_azure/resource/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class AzureStorageAccountDeleted(MicrosoftResource, PhantomBaseResource):
query_parameters=["api-version"],
access_path="value",
expect_array=True,
expected_error_codes={"ProviderError": None},
)
mapping: ClassVar[Dict[str, Bender]] = {
"id": S("id"),
Expand Down Expand Up @@ -1082,7 +1083,7 @@ class AzureStorageAccountUsage(MicrosoftResource, AzureBaseUsage):
query_parameters=["api-version"],
access_path="value",
expect_array=True,
expected_error_codes=AzureBaseUsage._expected_error_codes,
expected_error_codes=AzureBaseUsage._expected_error_codes | {"SubscriptionNotFound": None},
)
mapping: ClassVar[Dict[str, Bender]] = AzureBaseUsage.mapping | {
"id": S("name", "value"),
Expand Down
Loading