[Fix-Proxy] log exceptions from azure key vault on verbose_logger.exceptions (#5719)

* log exceptions from azure key vault

* fix error from azure key vault
This commit is contained in:
Ishaan Jaff 2024-09-16 16:58:37 -07:00 committed by GitHub
parent 8fbe2abb89
commit 7b09591ca6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -685,8 +685,10 @@ def load_from_azure_key_vault(use_azure_key_vault: bool = False):
f"Missing KVUri or client_id or client_secret or tenant_id from environment"
)
except Exception as e:
verbose_proxy_logger.debug(
"Error when loading keys from Azure Key Vault. Ensure you run `pip install azure-identity azure-keyvault-secrets`"
_error_str = str(e)
verbose_proxy_logger.exception(
"Error when loading keys from Azure Key Vault: %s .Ensure you run `pip install azure-identity azure-keyvault-secrets`",
_error_str,
)