forked from rails/exception_notification
-
Notifications
You must be signed in to change notification settings - Fork 423
Open
Description
ExceptionNotification has been working OK with the email configuration, but I recently added the 'google chat' parameter to receive my error in the Google space chat. I tested it in console, and it worked ok, but when I tried it with the rails' app, no message was sent, yet the email functioned normally. Thank you for your assistance as well as this wonderful find!
Steps to reproduce
Set configuration
Site::Application.config.middleware.use ExceptionNotification::Rack,
ignore_exceptions: ['Mime::Type::InvalidMimeType'] + ExceptionNotifier.ignored_exceptions,
# Don't send google chat notifications in test & development environments
ignore_notifier_if: {
google_chat: ->(env, exception) { Rails.env.development? || Rails.env.test? }
},
:email => {
:email_prefix => "[EXCEPTION] ",
:sender_address => %{"app email" <noreply@test.com>},
:exception_recipients => %w{system_messages@test.com}
},
:google_chat => {
webhook_url: Rails.application.credentials[:google_chat_webhook_url],
app_name: Rails.env.titlecase
},
error_grouping: trueExpected behavior
- Send email notification
- Send google chat notification
Actual behavior
- Send email notification
Note
Using the manual testing process in the rails console the application is sending both notification (email and google chat)
ExceptionNotifier.notify_exception(StandardError.new )System configuration
Rails version: 6.0.3.7
Ruby version: 2.7.1p83
Other configurations:
current gem version: "4.5.0"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels