Skip to content

Commit

Permalink
Improve exception message
Browse files Browse the repository at this point in the history
Exception notifications don't include the name of the exception so
improve the message to make it clearer what the issue is.
  • Loading branch information
gbp committed Oct 2, 2023
1 parent b3b9b48 commit 625c685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/incoming_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ def extract_attachments
if hidden_old_attachments.any?
# if there are hidden attachments error as we don't want to re-build and
# lose the prominence as this will make them public
raise UnableToExtractAttachments, "due to prominence of attachments " \
raise UnableToExtractAttachments, "unable to extract attachments due " \
"to prominence of attachments " \
"(ID=#{hidden_old_attachments.map(&:id).join(', ')})"
else
old_attachments.each(&:mark_for_destruction)
Expand Down

0 comments on commit 625c685

Please sign in to comment.