mirror of
https://github.com/instructkr/claude-code.git
synced 2026-06-04 11:36:44 +00:00
fix: classify mcp show missing server argument
This commit is contained in:
@@ -297,6 +297,8 @@ fn classify_error_kind(message: &str) -> &'static str {
|
||||
"session_load_failed"
|
||||
} else if message.contains("unsupported ACP invocation") {
|
||||
"unsupported_acp_invocation"
|
||||
} else if message.starts_with("missing_argument:") {
|
||||
"missing_argument"
|
||||
} else if message.contains("unsupported skills action") {
|
||||
"unsupported_skills_action"
|
||||
} else if message.contains("unrecognized argument") || message.contains("unknown option") {
|
||||
@@ -13476,6 +13478,11 @@ mod tests {
|
||||
classify_error_kind("unknown_option: unknown system-prompt option: --foo."),
|
||||
"unknown_option"
|
||||
);
|
||||
// #830: known command with missing required argument must not collapse to unknown.
|
||||
assert_eq!(
|
||||
classify_error_kind("missing_argument: mcp show requires a server name."),
|
||||
"missing_argument"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user