Add console error formatting to MCP CLI commands#11606
Merged
Merged
Conversation
- Added console.FormatErrorMessage() to pkg/workflow/mcp_config_validation.go (10 error sites) - Added console.FormatErrorMessage() to pkg/cli/mcp_validation.go (9 error sites) - Added console.FormatErrorMessage() to pkg/cli/mcp_inspect.go (18 error sites) - All error messages now use console formatting for better CLI visibility Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… formatting) - Reverted console.FormatErrorMessage() from pkg/workflow/mcp_config_validation.go (library code) - Kept console.FormatErrorMessage() in pkg/cli/mcp_validation.go (9 error sites - CLI helper functions) - Kept console.FormatErrorMessage() in pkg/cli/mcp_inspect.go (18 error sites - CLI helper functions) Validation library errors are already formatted when they reach CLI in compile_workflow_processor.go Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add console error formatting to MCP validation code
Add console error formatting to MCP CLI commands
Jan 24, 2026
pelikhan
approved these changes
Jan 24, 2026
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MCP configuration errors appeared as plain text without color/emphasis in CLI output, making debugging difficult. 0 of 126 MCP error sites used
console.FormatErrorMessage().Changes
Added console formatting to 27 error sites in MCP CLI commands:
pkg/cli/mcp_validation.go(9 sites): GitHub token validation, environment variables, status commandspkg/cli/mcp_inspect.go(18 sites): File I/O, server startup, configuration mergingValidation library (
pkg/workflow/mcp_config_validation.go) unchanged - errors already formatted at CLI boundary incompile_workflow_processor.go:147.Example
Before:
After:
Pattern
Console formatting applied only at CLI boundaries, not in validation libraries:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.