From abc3b7b19131bb4892a39ad1aa0451f9451ca9a4 Mon Sep 17 00:00:00 2001 From: Kagamine Rin Date: Thu, 4 Jun 2026 21:28:09 -0400 Subject: [PATCH] fix: surface error_information.error_message for failed requests without exception string Entry 3 had metadata.status='failure' and no exception, but DID have error_information.error_message='No api key passed in.' Now we surface that actual error message instead of the generic 'status: failure'. Priority: exception > error_message > generic status. --- litellm_dashboard.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/litellm_dashboard.py b/litellm_dashboard.py index 1d89d92..682657d 100644 --- a/litellm_dashboard.py +++ b/litellm_dashboard.py @@ -361,11 +361,16 @@ class Tools: # Error info if is_failed: - # Show exception if present, otherwise show status failure + # Priority: exception string > error_information.error_message > generic status if exception: err_short = exception[:80] + "…" if len(exception) > 80 else exception else: - err_short = "status: failure" + err_info = metadata.get("error_information", {}) or {} + err_msg = err_info.get("error_message", "") + if err_msg: + err_short = err_msg[:80] + "…" if len(err_msg) > 80 else err_msg + else: + err_short = "status: failure" base += f"\n └─ {err_short}" lines.append(base)