Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

dump errors on filesystem and notify developers

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 Mavenfile
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 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.