Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

email_error_reporter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

email_error_reporter

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

EmailErrorReporter

[!CAUTION] This is a very early prototype

email_error_reporter uses the new Rails error reporting API to send emails whenever an exception is being reported. It works out of the box with HTTP requests, jobs and the rails runner.

Installation

Add the gem:

bundle add email_error_reporter

and configure the email addresses that should receive an email in the case of an exception:

# application.rb
config.email_error_reporter.to = ["youremail@example.com"]

email_error_reporter will reuse your environment specific ActionMailer configuration for delivering emails.

Usage

All exceptions are reported automatically. No additional code required.

Please consult the official guides for an introduction to the error reporting API.

Optional configuration

Set a custom from address.

# default: "no-reply@example.com"
config.email_error_reporter.from = "your-custom-email@example.com"

Disables the email reports for specific environments. Mails are enabled by default on all envs.

# e.g. in development.rb
# default: true
config.email_error_reporter.enabled = false

Test your setup

You can use the built-in rake task rake email_error_reporter:check to check if everything works correctly in your setup.

If you're using Kamal, you can run the following command to test the setup in production:

kamal app exec -p 'bundle exec rake email_error_reporter:test_email'

License

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

FAQs

Package last updated on 15 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc