Improve auto generated email reply error message

This commit is contained in:
Arpit Jalan
2015-02-18 18:53:51 +05:30
parent e9f161e2bc
commit f3daae6dec
4 changed files with 13 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ module Email
class BadDestinationAddress < ProcessingError; end
class TopicNotFoundError < ProcessingError; end
class TopicClosedError < ProcessingError; end
class AutoGeneratedEmailError < ProcessingError; end
class EmailLogNotFound < ProcessingError; end
class InvalidPost < ProcessingError; end
@@ -41,7 +42,7 @@ module Email
end
raise BadDestinationAddress if dest_info[:type] == :invalid
raise TopicNotFoundError if message.header.to_s =~ /auto-generated/ || message.header.to_s =~ /auto-replied/
raise AutoGeneratedEmailError if message.header.to_s =~ /auto-generated/ || message.header.to_s =~ /auto-replied/
# TODO get to a state where we can remove this
@message = message