fix: allow null id in JSONRPCError per JSON-RPC 2.0 spec (#2056)
This commit is contained in:
parent
3b53fb9a00
commit
705497a593
1 changed files with 151 additions and 24 deletions
|
|
@ -71,7 +71,7 @@ async def stdio_server(stdin: anyio.AsyncFile[str] | None = None, stdout: anyio.
|
|||
try:
|
||||
async with write_stream_reader:
|
||||
async for session_message in write_stream_reader:
|
||||
json = session_message.message.model_dump_json(by_alias=True, exclude_none=True)
|
||||
json = session_message.message.model_dump_json(by_alias=True, exclude_unset=True)
|
||||
await stdout.write(json + "\n")
|
||||
await stdout.flush()
|
||||
except anyio.ClosedResourceError: # pragma: no cover
|
||||
|
|
|
|||
Loading…
Reference in a new issue