Add error log for client stdio (#924)
Co-authored-by: Your Name <youremail@yourdomain.com> Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
This commit is contained in:
parent
71889d7387
commit
146d7efb0f
1 changed files with 1 additions and 0 deletions
|
|
@ -154,6 +154,7 @@ async def stdio_client(server: StdioServerParameters, errlog: TextIO = sys.stder
|
||||||
try:
|
try:
|
||||||
message = types.JSONRPCMessage.model_validate_json(line)
|
message = types.JSONRPCMessage.model_validate_json(line)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
logger.exception("Failed to parse JSONRPC message from server")
|
||||||
await read_stream_writer.send(exc)
|
await read_stream_writer.send(exc)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue