mirror of
https://github.com/instructkr/claw-code.git
synced 2026-06-05 22:17:10 +08:00
fix: return typed error for unsupported MCP sub-actions
The catch-all in render_mcp_report_json_for now returns render_mcp_unsupported_action_json with ok:false and error_kind:unsupported_action instead of help JSON with exit 0. Generated with https://github.com/Yeachan-Heo/gajae-code Co-authored-by: Gajae Code <dev@gajae-code.com>
This commit is contained in:
@@ -3884,7 +3884,7 @@ fn agents_plugins_mcp_unknown_subcommand_have_hint_774() {
|
||||
};
|
||||
let parsed: serde_json::Value =
|
||||
serde_json::from_str(json_str.trim()).expect("mcp bogus should emit JSON");
|
||||
assert_eq!(parsed["error_kind"], "unknown_mcp_action");
|
||||
assert_eq!(parsed["error_kind"], "unsupported_action");
|
||||
let hint = parsed["hint"].as_str().unwrap_or("");
|
||||
assert!(!hint.is_empty(), "mcp bogus hint must be non-null (#774)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user