File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -466,11 +466,17 @@ async def post_writer(
466466 read_stream_writer = read_stream_writer ,
467467 )
468468
469- async def handle_request_async ():
470- if is_resumption :
471- await self ._handle_resumption_request (ctx )
472- else :
473- await self ._handle_post_request (ctx )
469+ async def handle_request_async () -> None :
470+ try :
471+ if is_resumption :
472+ await self ._handle_resumption_request (ctx )
473+ else :
474+ await self ._handle_post_request (ctx )
475+ except anyio .get_cancelled_exc_class ():
476+ raise
477+ except BaseException as exc :
478+ with contextlib .suppress (Exception ):
479+ await read_stream_writer .send (exc )
474480
475481 # If this is a request, start a new task to handle it
476482 if isinstance (message , JSONRPCRequest ):
You can’t perform that action at this time.
0 commit comments