fix: allow null id in JSONRPCError per JSON-RPC 2.0 spec (#2056)

This commit is contained in:
Max Isbey 2026-02-17 10:30:34 +00:00 • committed by GitHub
commit 705497a593
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -490,7 +490,7 @@ class Server(Generic[LifespanResultT]):
except Exception as err:
if raise_exceptions: # pragma: no cover
raise err
response = types.ErrorData(code=0, message=str(err), data=None)
response = types.ErrorData(code=0, message=str(err))
await message.respond(response)
else: # pragma: no cover