From 3c952e6a4acc908cf572a6cbaeabae10575c5c23 Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Thu, 25 Jan 2024 22:36:02 +0530 Subject: [PATCH] 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 --- app/mailboxes/reply_mailbox.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/app/mailboxes/reply_mailbox.rb b/app/mailboxes/reply_mailbox.rb index d60533856..0b1efd09a 100644 --- a/app/mailboxes/reply_mailbox.rb +++ b/app/mailboxes/reply_mailbox.rb @@ -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