A Ruby on Rails gem that replaces default error pages with dynamic custom views for 400/500 HTTP status codes.
ExceptionHandler is a Ruby on Rails gem that provides custom, dynamic error pages for HTTP 4xx and 5xx status codes. It solves the problem of Rails' generic, unstyled error pages by allowing developers to inject branded, user-friendly views when exceptions occur in production. The gem integrates seamlessly with Rails' middleware to override the default error response system.
Rails developers and teams who need to present professional, branded error pages in their production applications, especially those concerned with user experience and error monitoring.
Developers choose ExceptionHandler because it's the most popular and straightforward gem for custom Rails error pages, offering out-of-the-box functionality with extensive configuration options for logging, notifications, and layout control without requiring deep middleware modifications.
Ruby on Rails Custom Error Pages
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Replaces Rails' default error responses with dynamic HTML views that can be styled to match application branding, as highlighted in the README's focus on injecting custom exceptions app for polished user experiences.
Optionally saves exception details to a database table for analysis, with automatic migration handling via 'rails db:migrate' when the 'db' config option is set, simplifying error tracking.
Sends email notifications for errors, configurable per error type or status code range, and supports per-error notification settings in the 'exceptions' block, as detailed in the email configuration section.
Allows assigning different layouts to error pages, such as separate layouts for 4xx and 5xx errors, through a detailed configuration system that includes 'all', '4xx', and '5xx' options.
Last release was version 0.8.0.0 in August 2018, with no updates since, raising concerns about compatibility with newer Rails versions and lack of security patches or bug fixes.
Configuration uses both legacy and new structures (e.g., 'layouts' vs. 'exceptions' blocks), with nested options that can be confusing, as shown in the lengthy config example and notes about deprecation.
Database logging requires ActiveRecord, making it unsuitable for applications using other ORMs or those without a database, and rolling back migrations is only possible with the gem installed, risking orphaned tables.