Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
dump errors on filesystem and notify developers
Ruby
Tree: 07e7b7cc2b

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.travis.yml
Gemfile
MIT-LICENSE
Mavenfile
README.textile
Rakefile
ixtlan-error-handler.gemspec

README.textile

Rails Error Dumper

the main idea here is notify the developers on error but in a way to protect privacy of the users of the system. to do so ALL data need to remain on the server and they need to be deleted after period of time.

  • first to dump as much as possible onto the filesystem of the server when an error occurs, i.e. the environment, the request, the response, the session, etc
  • notify the developers
  • delete expired error dumps

the next idea is to collect all possible rails exception and map them to three error pages and pass on a message. for each exception you can decide whether an error dump is needed or not.

install

in Gemfile add gem ‘ixtlan-error-handler’

for the configuration add for example in config/initializers/error_handler.rb

config.error_dumper.dump_dir = Rails.root + "/log/errors" # default: log/errors
config.error_dumper.email_from = "no-reply@example.com"
config.error_dumper.email_to = "developer1@example.com,developer2@example.com"
config.error_dumper.keep_dumps = 30 # days
config.skip_rescue_module = true # do not include the predefined Rescue 

relation to ixtlan gem

the ixtlan gem provides a setup generator which adds configuration examples for this gem in config/initializer/ixtlan.rb (the dynamic configuration is part of the ixtlan gem and it is just easier to keep that inside that gem !!!)

relation to ixtlan-audit gem

if that gem is present and loaded than any error will be log with the help of Ixtlan::Audit::UserLogger

Something went wrong with that request. Please try again.