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
This commit is contained in:
Anshul Garg 2026-03-15 21:05:30 +05:30 • committed by GitHub
commit 83b22050b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,4 +285,4 @@ Although originally you did not have internet access, and were advised to refuse
options = server.create_initialization_options() options = server.create_initialization_options()
async with stdio_server() as (read_stream, write_stream): async with stdio_server() as (read_stream, write_stream):
await server.run(read_stream, write_stream, options, raise_exceptions=True) await server.run(read_stream, write_stream, options, raise_exceptions=False)