mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Properly add status_code on exceptions. Fixes #255
This commit is contained in:
parent
6b034c3b2f
commit
2248475573
1 changed files with 1 additions and 0 deletions
|
@ -22,6 +22,7 @@ module Kemal
|
||||||
if Kemal.config.error_handlers.has_key?(status_code)
|
if Kemal.config.error_handlers.has_key?(status_code)
|
||||||
context.response.content_type = "text/html" unless context.response.headers.has_key?("Content-Type")
|
context.response.content_type = "text/html" unless context.response.headers.has_key?("Content-Type")
|
||||||
context.response.print Kemal.config.error_handlers[status_code].call(context, exception)
|
context.response.print Kemal.config.error_handlers[status_code].call(context, exception)
|
||||||
|
context.response.status_code = status_code
|
||||||
context
|
context
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue