From d48894a02ce85ea4542d6986838186810a6ffcde Mon Sep 17 00:00:00 2001 From: Takeshi Yashiro Date: Tue, 17 May 2022 19:19:00 +0900 Subject: [PATCH] Treat HTTPException as it is, necessary to keep the original status code --- .../aiohttp_channel_service_exception_middleware.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/botbuilder-core/botbuilder/core/integration/aiohttp_channel_service_exception_middleware.py b/libraries/botbuilder-core/botbuilder/core/integration/aiohttp_channel_service_exception_middleware.py index d58073d06..ef87d7489 100644 --- a/libraries/botbuilder-core/botbuilder/core/integration/aiohttp_channel_service_exception_middleware.py +++ b/libraries/botbuilder-core/botbuilder/core/integration/aiohttp_channel_service_exception_middleware.py @@ -5,6 +5,7 @@ from aiohttp.web import ( middleware, + HTTPException, HTTPNotImplemented, HTTPUnauthorized, HTTPNotFound, @@ -27,6 +28,8 @@ async def aiohttp_error_middleware(request, handler): raise HTTPUnauthorized() except KeyError: raise HTTPNotFound() + except HTTPException: + raise except Exception: traceback.print_exc() raise HTTPInternalServerError()