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)
|
||||
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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user