mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: show rejected emails with unrecognized errors (#5026)
Although 407a23663df6c8e66c5c3b8e5cbf21a609de4109 will send rejection messages for unrecognized errors, sometimes processing the email will raise an error which has a blank message. This commit: 1. Shows rejected emails which have already been processed and contain a blank error in /admin/email/rejected 2. Replaces new blank error messages with the error type
This commit is contained in:
@ -49,7 +49,9 @@ module Email
|
||||
@incoming_email = create_incoming_email
|
||||
process_internal
|
||||
rescue => e
|
||||
@incoming_email.update_columns(error: e.to_s) if @incoming_email
|
||||
error = e.to_s
|
||||
error = e.class.name if error.blank?
|
||||
@incoming_email.update_columns(error: error) if @incoming_email
|
||||
raise
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user