From c5083f0f2bac3785b71b819842746e0eb391640b Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Fri, 17 Nov 2023 09:20:14 -0800 Subject: [PATCH] Correct error page rendering via Sanic. --- cista/util/apphelpers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cista/util/apphelpers.py b/cista/util/apphelpers.py index 786c7f1..9562226 100644 --- a/cista/util/apphelpers.py +++ b/cista/util/apphelpers.py @@ -41,9 +41,7 @@ async def handle_sanic_exception(request, e): res.cookies.add_cookie("message", message, max_age=5) return res # Otherwise use Sanic's default error page - res = errorpages.HTMLRenderer(request, e, debug=request.app.debug).full() - res.status = status # Unfortunately Sanic <23.12 doesn't set this - return res + return errorpages.HTMLRenderer(request, e, debug=request.app.debug).render() def websocket_wrapper(handler):