Repository navigation
#4213 removed explicit raise_exceptions=True - #4553
Rithika-07 wants to merge 1 commit into
Conversation
|
Thank you for this pull request, and apologies for the long wait for a response. Since it was opened, the reference servers have been rebuilt for the 2026-07-28 MCP specification (#4857) and released as v2 (2.0.0 on npm for the TypeScript servers, 2026.10.19 on PyPI for the Python servers). The code this PR changes has been replaced, and the behavior it addresses has either been fixed in v2 or no longer exists in the same form. This is not a judgment on the change or on you; it's a consequence of the code it targets having been replaced. If the problem still happens on v2, please open a fresh issue with the version you're running and steps to reproduce. Note that this repository now accepts contributions as issues rather than pull requests from anyone but its maintainers; see This is part of the backlog triage in #4875. |
Description
Removes the explicit
raise_exceptions=Trueflag inmcp-server-git. This aligns its crash/error handling behavior with other reference servers (likemcp-server-timeandmcp-server-sqlite), ensuring malformed client input results in a JSON-RPC error response rather than crashing the server process.Server Details
src/git/src/mcp_server_git/server.py)Motivation and Context
There was an inconsistency in crash behavior across MCP reference servers when handling malformed client input (such as deep recursion payloads triggering Pydantic
ValidationError):mcp-server-githadraise_exceptions=Trueexplicitly set, causing unhandled exceptions to tear down the task group and terminate the server process with exit code 1.raise_exceptions=False), which handles the exception and reports it back to the client as an error while keeping the process running.Removing
raise_exceptions=Trueresolves this reliability issue and standardizes error handling behavior across reference servers.How Has This Been Tested?
pytestin a clean Python virtual environment. All 43 existing tests passed with zero regressions.tools/call(git_add) payload (200+ levels deep):ValidationError).Breaking Changes
Types of changes
Checklist
Additional context