Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration for a subject prefix for email #66

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

francescob
Copy link

Added an option to add a subject prefix to the emails sent by solid_errors. Useful when you have multiple apps/environments using solid errors and what to easily filter the email received

Copy link
Owner

@fractaledmind fractaledmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, just one small change needed

@@ -6,7 +6,7 @@ def error_occurred(occurrence)
@error = occurrence.error

mail(
subject: "#{@error.severity_emoji} #{@error.exception_class}",
subject: "#{SolidErrors.subject_prefix} #{@error.severity_emoji} #{@error.exception_class}",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handle an empty prefix

@francescob
Copy link
Author

Ok, now the empty prefix is handled.
i also have another idea that fits in the way we use solid_errors:
Make subject_prefix enabled by default, with a value of
[#{Rails.application.name.upcase][#Rails.application.env.upcase].
Disable it with config.solid_errors.subject_prefix = "" or override it with your own custom string
What do you think about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants