controller
controller copied to clipboard
handle_exception should allow exception names as strings
It would be nice to be able to rescue from anticipated errors without needing to require the gem at the top of the action in order to make that error constant available at the time the action is defined.
This would also make it more consistent with our new render_error_responses setting:
setting :render_error_responses, default: Hash.new(:internal_server_error).merge!(
"Hanami::Router::NotAllowedError" => :not_found,
"Hanami::Router::NotFoundError" => :not_found,
)