controller icon indicating copy to clipboard operation
controller copied to clipboard

handle_exception should allow exception names as strings

Open timriley opened this issue 2 years ago • 0 comments

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,
    )

timriley avatar Nov 04 '23 00:11 timriley