From 38a539baf4b409d99c63d904c5d063d63330d4fb Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 15 May 2024 13:23:44 -0700 Subject: [PATCH] show debug info on slack alerts --- litellm/proxy/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index a97864f000..0555a485b5 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -418,9 +418,14 @@ class ProxyLogging: Related issue - https://github.com/BerriAI/litellm/issues/3395 """ + litellm_debug_info = getattr(original_exception, "litellm_debug_info", None) + exception_str = str(original_exception) + if litellm_debug_info is not None: + exception_str += litellm_debug_info + asyncio.create_task( self.alerting_handler( - message=f"LLM API call failed: {str(original_exception)}", + message=f"LLM API call failed: {exception_str}", level="High", alert_type="llm_exceptions", request_data=request_data,