Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle_exception should allow exception names as strings #432

Open
timriley opened this issue Nov 4, 2023 · 0 comments
Open

handle_exception should allow exception names as strings #432

timriley opened this issue Nov 4, 2023 · 0 comments

Comments

@timriley
Copy link
Member

timriley commented Nov 4, 2023

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,
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant