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):