-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Sending the confirmation mailer in my Rails app sometimes fails randomly without raising any exception. I discover it only when I visit the dashboard, and I see the following error:
Type: ActionView::MissingTemplate
Message: Missing template user_mailer/confirmation_instructions with "mailer". Searched in: * user_mailer.
It doenst do it regulary, only sometime. However, when I retry the job, it executes without any problem.
I’m simply using:
UserMailer.confirmation_instructions(@user).deliver_later
And:
ActionMailer::MailDeliveryJob.rescue_from(Exception) do |exception|
Rails.error.report(exception)
raise exception
end
This doesn’t raise any error in my logs, or exception that will sent to my Mail. The failure seems completely random, and I only notice it when checking Mission Control.
I know Solid Queue doesn’t have any automatic retry mechanism, but since this is a critical system feature in my app, I need a way to automatically retry or re-send the mailer job when it fails.