Skip to content

Commit 83b2205

Browse files
fix(fetch): handle malformed input without crashing (#3515)
fix(fetch): handle malformed input without crashing Changes `raise_exceptions=True` to `raise_exceptions=False` in the fetch server's `Server.run()` call, preventing the server from crashing on malformed JSON-RPC input. This aligns with the SDK's intended default behavior and is consistent with other reference servers. Fixes #3359
1 parent a97aba1 commit 83b2205

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/fetch/src/mcp_server_fetch/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,4 +285,4 @@ async def get_prompt(name: str, arguments: dict | None) -> GetPromptResult:
285285

286286
options = server.create_initialization_options()
287287
async with stdio_server() as (read_stream, write_stream):
288-
await server.run(read_stream, write_stream, options, raise_exceptions=True)
288+
await server.run(read_stream, write_stream, options, raise_exceptions=False)

0 commit comments

Comments
 (0)