refactor: replace .error() with .exception() logging for better debugging on sentry

This commit is contained in:
Krrish Dholakia 2024-08-16 09:22:47 -07:00
parent 1510daba4f
commit 61f4b71ef7
35 changed files with 242 additions and 253 deletions

View file

@ -92,7 +92,11 @@ class _ENTERPRISE_LLMGuard(CustomLogger):
},
)
except Exception as e:
verbose_proxy_logger.error(traceback.format_exc())
verbose_proxy_logger.exception(
"litellm.enterprise.enterprise_hooks.llm_guard::moderation_check - Exception occurred - {}".format(
str(e)
)
)
raise e
def should_proceed(self, user_api_key_dict: UserAPIKeyAuth, data: dict) -> bool: