set response status code before creating exception template (#468)

This commit is contained in:
Anton Maminov 2018-07-02 10:28:00 +03:00 committed by Serdar Dogruyol
parent ced34b7651
commit b8ec6ee328

View file

@ -22,13 +22,14 @@ def render_404
end
def render_500(context, exception, verbosity)
context.response.status_code = 500
template = if verbosity
Kemal::ExceptionPage.for_runtime_exception(context, exception).to_s
else
Kemal::ExceptionPage.for_production_exception
end
context.response.status_code = 500
context.response.print template
context
end