FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(ui): show full MCP error messages without truncation by tusharmath · Pull Request #2695 · tailcallhq/forgecode · GitHub

fix(ui): show full MCP error messages without truncation - #2695

Merged
tusharmath merged 1 commit into
mainfrom
mcp-failure-log
Mar 25, 2026
Merged

fix(ui): show full MCP error messages without truncation#2695
tusharmath merged 1 commit into
mainfrom
mcp-failure-log

Conversation

tusharmath commented Mar 25, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

Summary

Fix mcp list to display full MCP server error messages without truncation, shown in red after the server list.

Context

Previously, MCP failure messages were truncated to 80 characters with a trailing ..., making it impossible to read the full error — especially for multi-line errors like connection stack traces. This made diagnosing why an MCP server failed to initialize unnecessarily difficult.

Changes

  • Removed the 80-character truncation applied to MCP failure error messages
  • Moved the failures section to render after the main server list (and after porcelain output), so it doesn't interfere with machine-readable output
  • Failures are now displayed in full, in red, under a MCP FAILURES heading
  • Failures are suppressed in --porcelain mode to keep machine-readable output clean

Testing

# Run mcp list with a failing server configured (e.g. a bad URL)
cargo run -- mcp list

# Verify:
# - Full error message is shown (not truncated)
# - Error text is rendered in red
# - Porcelain output is unaffected
cargo run -- mcp list --porcelain

tusharmath changed the title feat(ui): display mcp failures in red text fix(ui): show full MCP error messages without truncation Mar 25, 2026
tusharmath enabled auto-merge (squash) March 25, 2026 19:28
tusharmath merged commit 267350f into main Mar 25, 2026
11 checks passed
tusharmath deleted the mcp-failure-log branch March 25, 2026 19:28
// Show failed MCP servers
if !porcelain && !all_tools.mcp.get_failures().is_empty() {
self.writeln("MCP FAILURES\n".dimmed().bold())?;
for (_, error) in all_tools.mcp.get_failures().iter() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Critical bug: The server name is discarded (using _), so users won't know which MCP server failed. The original code showed [✗] {server_name} - {error}. Without the server name, it's impossible to identify which server is failing, especially when multiple servers fail.

// Fix: Include the server name in the output
for (server_name, error) in all_tools.mcp.get_failures().iter() {
    let error_msg = format!("{}: {}", server_name, error);
    self.writeln(style(error_msg).red())?;
}

Spotted by Graphite



Is this helpful? React 👍 or 👎 to let us know.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL