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

Google Chat is not sending error notification #531

Open
charly-palencia opened this issue May 23, 2022 · 0 comments
Open

Google Chat is not sending error notification #531

charly-palencia opened this issue May 23, 2022 · 0 comments

Comments

@charly-palencia
Copy link

charly-palencia commented May 23, 2022

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" <[email protected]>},
		  :exception_recipients => %w{[email protected]}
	},
    :google_chat => {
      webhook_url: Rails.application.credentials[:google_chat_webhook_url],
      app_name: Rails.env.titlecase
    },
	error_grouping: true

Expected 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"

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

No branches or pull requests

1 participant