Skip to content

fix(cli): include path in mcp config parse errors#354

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-mcp-config-parse-path
Open

fix(cli): include path in mcp config parse errors#354
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-mcp-config-parse-path

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • include the MCP config file path in TOML parse errors
  • route MCP config reads through a shared parser helper so add/get/list/remove/auth paths report the source file consistently
  • add regression coverage for parse errors including the config path

Fixes PlatformNetwork/bounty-challenge#52424

Validation

  • cargo +stable fmt --package cortex-cli --check
  • cargo +stable test --package cortex-cli mcp_cmd::config::tests::test_parse_config_content_error_includes_path -- --nocapture
  • cargo +stable test --package cortex-cli mcp_cmd:: -- --nocapture (191 passed)
  • cargo +stable check --package cortex-cli --lib
  • cargo +stable build --package cortex-cli --bin Cortex
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.1] mcp config.toml TOML parse error omits file path — user cannot identify which file is malformed

1 participant