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

@ -3027,9 +3027,9 @@ class Router:
)
except Exception as e:
verbose_router_logger.error(
"litellm.proxy.hooks.prompt_injection_detection.py::async_pre_call_hook(): Exception occured - {}\n{}".format(
str(e), traceback.format_exc()
verbose_router_logger.exception(
"litellm.proxy.hooks.prompt_injection_detection.py::async_pre_call_hook(): Exception occured - {}".format(
str(e)
)
)
pass