diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 529d40df27..ed3d8ebc4c 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -24,6 +24,7 @@ class MailHandler < ActionMailer::Base class UnauthorizedAction < StandardError; end class NotAllowedInProject < UnauthorizedAction; end class InsufficientPermissions < UnauthorizedAction; end + class LockedTopic < UnauthorizedAction; end class MissingInformation < StandardError; end attr_reader :email, :user, :handler_options @@ -300,7 +301,7 @@ class MailHandler < ActionMailer::Base add_attachments(reply) reply else - logger&.info "MailHandler: ignoring reply from [#{email.from.first}] to a locked topic" + raise LockedTopic, "ignoring reply to a locked message [#{message.id} #{message.subject}]" end end