Fixed for handling exceptions of asgi app call. (#2211)

@cansarigol3megawatt Thanks for looking into this and getting the quick turnaround on this. I will 🍒 pick this into the 21.6 branch and get it out a little later tonight.
This commit is contained in:
Can Sarigol
2021-08-02 18:12:12 +02:00
committed by GitHub
parent 54ca6a6178
commit 0ba57d4701
3 changed files with 35 additions and 3 deletions

View File

@@ -1 +1 @@
__version__ = "21.6.1"
__version__ = "21.6.2"

View File

@@ -207,4 +207,7 @@ class ASGIApp:
"""
Handle the incoming request.
"""
await self.sanic_app.handle_request(self.request)
try:
await self.sanic_app.handle_request(self.request)
except Exception as e:
await self.sanic_app.handle_exception(self.request, e)