Method: Hanami::Config#render_error_responses
- Defined in:
- lib/hanami/config.rb
permalink #render_error_responses ⇒ Hash{String => Symbol}
Sets a mapping of exception class names (as strings) to symbolic response status codes used for rendering error responses.
The response status codes will be passed to ‘Rack::Utils.status_code`.
In ordinary usage, you should not replace this hash. Instead, add keys and values for the errors you want handled.
182 183 184 185 |
# File 'lib/hanami/config.rb', line 182 setting :render_error_responses, default: Hash.new(:internal_server_error).merge!( "Hanami::Router::NotAllowedError" => :not_found, "Hanami::Router::NotFoundError" => :not_found, ) |