diff --git a/sanic/app.py b/sanic/app.py index 75e97889..1d9a4987 100644 --- a/sanic/app.py +++ b/sanic/app.py @@ -484,13 +484,13 @@ class Sanic: # Response Middleware # -------------------------------------------- # try: - response = await self._run_response_middleware(request, response) + response = await self._run_response_middleware(request, + response) except: log.exception( 'Exception occured in one of response middleware handlers' ) - # pass the response to the correct callback if isinstance(response, StreamingHTTPResponse): await stream_callback(response)