8000 Treat HTTPException as it is, necessary to keep the original status c… · microsoft/botbuilder-python@d6b5e67 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6b5e67

Browse files
takeshi-yashiroaxelsrztracyboehrer
authored
Treat HTTPException as it is, necessary to keep the original status code (#1939)
Co-authored-by: Axel Suárez <axsuarez@microsoft.com> Co-authored-by: tracyboehrer <tracyboehrer@users.noreply.github.com>
1 parent 786650e commit d6b5e67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/botbuilder-core/botbuilder/core/integration/aiohttp_channel_service_exception_middleware.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from aiohttp.web import (
77
middleware,
8+
HTTPException,
89
HTTPNotImplemented,
910
HTTPUnauthorized,
1011
HTTPNotFound,
@@ -27,6 +28,8 @@ async def aiohttp_error_middleware(request, handler):
2728
raise HTTPUnauthorized()
2829
except KeyError:
2930
raise HTTPNotFound()
31+
except HTTPException:
32+
raise
3033
except Exception:
3134
traceback.print_exc()
3235
raise HTTPInternalServerError()

0 commit comments

Comments
 (0)
0