ActiveJob::DeserializationError
is not reported in ActionMailer
#1164
Labels
ActiveJob::DeserializationError
is not reported in ActionMailer
#1164
I use ActionMailer.
Since we are using ActionMailer,
Rollbar::ActiveJob
is automatically applied.rollbar-gem/lib/rollbar/plugins/active_job.rb
Line 46 in c4edf7e
This makes it very convenient that any exceptions that occur during the mail sending process are automatically reported to the Rollbar.
Steps to reproduce
ActiveJob::DeserializationError
occurs due to non-existent User and mail sending fails.Expected behavior
Reported in Rollbar
Actual behavior
Not reported in Rollbar
Possible Causes
However, I noticed that Rollbar is not notified about
ActiveJob::DeserializationError
.#1146 We believe this fix is the cause.
This fix is intended to prevent double reporting of exceptions generated inside ActionMailer.
The following is controlled for ActionMailer.
In the case of
ActiveJob::DeserializationError
,self
is the Mailer class itself, soself.class.ancestors.include?(ActionMailer::Base) #=> false
is determined.No
arguments
are defined for the ActionMailer class itself.The result does not seem to be reported in Rollbar.
This PullRequest is also helpful.
rails/rails#25018
Workaround
If you rescue_from
ActiveJob::DeserializationError
in the Mailer class, you can notify Rollbar as expected.The text was updated successfully, but these errors were encountered: