Correct error page rendering via Sanic.
This commit is contained in:
parent
f8a9197474
commit
c5083f0f2b
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user