-
-
Notifications
You must be signed in to change notification settings - Fork 193
Closed
Description
Description
In the docs for Kemal, one of the example error handlers is
error 403 do
"Access Forbidden!"
end
The only way for this error handler to work is for somewhere in the code to set the status code on the response and then raise a Kemal::Exceptions::CustomException
(or ancestor of it).
I believe this kind of error would be better handled like
error AccessForbiddenError do
"Access Forbidden"
end
We could go into these error handlers with the default status of 500 unless the error is a custom Kemal error where the status could be specified on it.
What do you think?
mamantoha, hugopl and hahwul
Metadata
Metadata
Assignees
Labels
No labels