From 249a3d32841765570c40040d8c4b5ab2b0173186 Mon Sep 17 00:00:00 2001 From: Vladimir Magamedov Date: Thu, 29 Aug 2019 11:12:09 +0300 Subject: [PATCH] Avoid logging of the user-raised GRPCError on the server-side --- grpclib/server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grpclib/server.py b/grpclib/server.py index fdea26a..772582b 100644 --- a/grpclib/server.py +++ b/grpclib/server.py @@ -415,6 +415,8 @@ async def request_handler( content_type=content_type, ) await method_func(stream) + except GRPCError: + raise except asyncio.TimeoutError: if wrapper.cancel_failed: log.exception('Failed to handle cancellation')