log exceptions from azure key vault

This commit is contained in:
Ishaan Jaff 2024-09-16 06:52:46 -07:00
parent 5fb270a559
commit 7aff33fbcc

View file

@ -685,8 +685,12 @@ 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(e)
_traceback = traceback.format_exc()
_error_str = _error + "\n" + _traceback
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,
)