Fix recent changes to `CustomException` (#673)

This commit is contained in:
Sijawusz Pur Rahnama 2024-02-14 11:33:05 +01:00 committed by GitHub
parent bef7351000
commit 7c47bbc150
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -13,9 +13,9 @@ module Kemal::Exceptions
end
class CustomException < Exception
def initialize(context : HTTP::Server::Context, message : String = "")
@context = context
@message = message
def initialize(@context : HTTP::Server::Context, message : String? = nil)
message ||= "Rendered error with #{context.response.status_code}"
super message
end
end
end