From 7b09591ca6be79142a9fe1242fc08d116fd8256f Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 16 Sep 2024 16:58:37 -0700 Subject: [PATCH] [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 --- litellm/proxy/proxy_server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 1ae14de692ec..581db4e32efe 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -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, )