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)