Skip to content

Commit 2d40d09

Browse files
refactor(cli): standardize remove-server failure error
1 parent 9a8377f commit 2d40d09

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

hatch/cli/cli_mcp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,11 @@ def handle_mcp_remove_server(args: Namespace) -> int:
17501750
result_reporter.report_result()
17511751
return EXIT_ERROR
17521752
else:
1753-
print(f"[ERROR] Failed to remove '{server_name}' from any hosts")
1753+
reporter = ResultReporter("hatch mcp remove-server")
1754+
reporter.report_error(
1755+
f"Failed to remove '{server_name}' from any hosts",
1756+
details=[f"Attempted hosts: {', '.join(target_hosts)}"]
1757+
)
17541758
return EXIT_ERROR
17551759

17561760
except Exception as e:

0 commit comments

Comments
 (0)