show debug info on slack alerts

This commit is contained in:
Ishaan Jaff 2024-05-15 13:23:44 -07:00
parent b645d8dcf9
commit 38a539baf4

View file

@ -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,