fix: change email conversation not found exception to log (#8785)
* fix: change email conversation not found exception to log * chore: refactor reply_mailbox methods --------- Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -6,11 +6,12 @@ class ReplyMailbox < ApplicationMailbox
|
||||
EMAIL_PART_PATTERN = /^reply\+([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})$/i
|
||||
|
||||
before_processing :conversation_uuid_from_to_address,
|
||||
:find_relative_conversation,
|
||||
:verify_decoded_params,
|
||||
:decorate_mail
|
||||
:find_relative_conversation
|
||||
|
||||
def process
|
||||
return if @conversation.blank?
|
||||
|
||||
decorate_mail
|
||||
create_message
|
||||
add_attachments_to_message
|
||||
end
|
||||
@@ -78,12 +79,8 @@ class ReplyMailbox < ApplicationMailbox
|
||||
find_conversation_by_message_id(in_reply_to_addresses) if @conversation.blank?
|
||||
end
|
||||
|
||||
def verify_decoded_params
|
||||
raise 'Conversation uuid not found' if conversation_uuid.nil?
|
||||
end
|
||||
|
||||
def validate_resource(resource)
|
||||
raise "Email conversation with uuid: #{conversation_uuid} not found" if resource.nil?
|
||||
Rails.logger.error "[App::Mailboxes::ReplyMailbox] Email conversation with uuid: #{conversation_uuid} not found" if resource.nil?
|
||||
|
||||
resource
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user