Correct error page rendering via Sanic.

This commit is contained in:
Leo Vasanko 2023-11-17 09:20:14 -08:00
parent f8a9197474
commit c5083f0f2b

View File

@ -41,9 +41,7 @@ async def handle_sanic_exception(request, e):
res.cookies.add_cookie("message", message, max_age=5) res.cookies.add_cookie("message", message, max_age=5)
return res return res
# Otherwise use Sanic's default error page # Otherwise use Sanic's default error page
res = errorpages.HTMLRenderer(request, e, debug=request.app.debug).full() return errorpages.HTMLRenderer(request, e, debug=request.app.debug).render()
res.status = status # Unfortunately Sanic <23.12 doesn't set this
return res
def websocket_wrapper(handler): def websocket_wrapper(handler):