Open jcarbaugh opened 10 years ago
FormageddonLetter is a strange beast. For instance, part of its class definition comes in a gem from https://github.com/sunlightlabs/formageddon using a funky dependency import at the top of formageddon_letter.rb. Presently we seem to be depending on a try/catch in email_congress_controller.rb to rescue the problem in the confirm method. Raven captures the exception and the user is redirected to complete_profile.
On closer examination, this may be intended behavior as the error hits in a " ActiveRecord::Base.transaction ... end" block so any database changes should be undone if a validation error strikes at any point in that code. Perhaps a more specific rescue case to handle this specific problem and be more friendly to the user would be helpful?
It's possible for an incoming email to create a seed even when it does not have a body. When the confirmation link is clicked, ActiveRecord validation fails because body is a required field on a FormageddonLetter.
See https://app.getsentry.com/opencongress/oc-production/group/22165844/