Have you ever wondered how programmers check for bugs in their web applications? Today we’ll take a look at a helpful tool called the exception_notification gem used in Ruby programming.
The exception_notification gem is like a digital alert system for your Ruby web application. If something goes wrong with your project (we call these "exceptions"), these gems send you a notification. It’s like having a friend tell you when you’re wrong!
The exception_notification gem provides a set of notifiers for sending notifications when errors occur in a Rack/Rails application. For more information, visit https://github.com/smartinez87/exception_notification
You add a gem to your Ruby project.
You set up where you want to receive notifications (email, HipChat, Slack, Mattermost, Teams, IRC, Amazon SNS, Google Chat, Datadog or via custom WebHooks).
If there is an error in your app, the gem itself sends you a message telling you what went wrong.
Imagine you are building a website. If something is wrong, you want to know about it as soon as possible so you can fix it. The exception_notification gem helps you do just that. It’s like a 24/7 guard for your website!
Add the following line to your application's Gemfile:
gem 'exception_notification'
With Rails, in order to install ExceptionNotification as an engine, just run the following command from the terminal:
rails g exception_notification:install
This generates an initializer file, config/initializers/exception_notification.rb
with some default configuration, which you should modify as needed.
You can add middleware manually, use Rack/Sinatra, use Resque/Sidekiq, visit https://github.com/smartinez87/exception_notification