You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instructions in the README, setting up action_mailer.rb file to catch SparkPostRails::DeliveryException but it doesn't seem to work.
The issue is that if you use sparkpost with devise, and a user tries to register with an email that doesn't have any MX records... (example: [email protected]) sparkpost throws a DeliveryException, and my app crashes. Am I doing something wrong? Here's my action_mailer.rb file
ActionMailer::DeliveryJob.rescue_from(SparkPostRails::DeliveryException) do |exception|
redirect_to '/logout', alert: "Please use a valid email address."
# do something special with the error
end
The text was updated successfully, but these errors were encountered:
gbrl
changed the title
Devise registration throws 500 when email is invalid, catching error doesn't work
Sparkpost throws 500 when email is invalid, catching error doesn't work
Nov 7, 2016
I followed the instructions in the README, setting up action_mailer.rb file to catch
SparkPostRails::DeliveryException
but it doesn't seem to work.The issue is that if you use sparkpost with devise, and a user tries to register with an email that doesn't have any MX records... (example: [email protected]) sparkpost throws a DeliveryException, and my app crashes. Am I doing something wrong? Here's my action_mailer.rb file
The text was updated successfully, but these errors were encountered: