Rack::ErrorHandler

Gem Version CI Coverage Status Code Climate

Rack middleware to log request errors and respond with standard message

Installation

Add this line to your application's Gemfile:

gem 'rack-error_handler'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rack-error_handler

Usage

logger = Logger.new STDOUT

use Rack::ErrorHandler, logger: Logger.new(STDOUT)

use Rack::ErrorHandler, logger: logger,
                        error_message: '<html><body><h1>Server Error</h1></body></html>'

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/gabynaiman/rack-error_handler.

License

The gem is available as open source under the terms of the MIT License.