It seems that the self.service_client.get_account_information() can throw an HttpResponseError when the client is supplied with a DefaultAzureCredential:
azure.core.exceptions.HttpResponseError: This request is not authorized to perform this operation using this permission.
RequestId:XXXXXXXXXXXXXXXXXX
Time:2024-11-21T13:35:08.6097052Z
ErrorCode:AuthorizationPermissionMismatch
Content: <?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.
RequestId:8XXXXXXXXXXXXXXXXXX
Time:2024-11-21T13:35:08.6097052Z</Message></Error>
Maybe the except ResourceNotFoundError should be extended to catch the HttpResponseError as well?
It seems that the
self.service_client.get_account_information()
can throw anHttpResponseError
when the client is supplied with aDefaultAzureCredential
:Maybe the
except ResourceNotFoundError
should be extended to catch theHttpResponseError
as well?