From 919d8a59c31de6fce67c538b7bd86d093b0a8cfe Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 20 Sep 2026 01:39:38 +0000 Subject: [PATCH] fix(proxy): guard bug report generation for invalid exceptions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/proxy/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 9f6317316ad..95f958c6c01 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -7841,7 +7841,7 @@ def handle_exception_on_proxy(e: Exception, litellm_call_id: str | None = None) elif isinstance(e, ProxyException): return with_litellm_call_id(e, litellm_call_id) _status_code: Final = getattr(e, "status_code", status.HTTP_500_INTERNAL_SERVER_ERROR) - if _status_code == status.HTTP_500_INTERNAL_SERVER_ERROR and bug_report_enabled(): + if _status_code == status.HTTP_500_INTERNAL_SERVER_ERROR and bug_report_enabled() and isinstance(e, BaseException): verbose_proxy_logger.error(bug_report_notice(build_bug_report(e, surface="proxy"))) return ProxyException( message=str(e),