-
-
Notifications
You must be signed in to change notification settings - Fork 196
Incoming Message breaks Holding Pen
Gareth Rees edited this page Dec 15, 2017
·
1 revision
pen = InfoRequest.holding_pen_request
pen.incoming_messages.count
# find the problem message – generally you can find a method called on
# `IncomingMesasge` in the stack trace, e.g. in this case it was
# `IncomingMesasge#specific_from_name?`, so just run that against each message
# and find the one that errors…
pen.incoming_messages[0].specific_from_name?
pen.incoming_messages[1].specific_from_name?
# etc
# Can obviously do something more clever if there are loads of messages
# Get the failing message
msg = pen.incoming_messages[3]
# Get the raw email ID
msg.raw_email.id
# Download the raw email from /admin/raw_email/:id and investigate
# If its spam, just "Destroy message"
# Otherwise, hard to say. Maybe https://github.com/mysociety/alaveteli/wiki/Manually-adding-responses