Skip to content

handle_exception should allow exception names as strings #432

Open
@timriley

Description

@timriley

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions