Remove channel auth error

This commit is contained in:
Pranav
2024-05-23 11:18:19 -07:00
parent ce2a4f5c34
commit 184325dcae
+3 -3
View File
@@ -14,7 +14,7 @@ class Inboxes::FetchImapEmailsJob < MutexApplicationJob
rescue *ExceptionList::IMAP_EXCEPTIONS => e
Rails.logger.error "Authorization error for email channel - #{channel.inbox.id} : #{e.message}"
rescue EOFError, OpenSSL::SSL::SSLError, Net::IMAP::NoResponseError, Net::IMAP::BadResponseError, Net::IMAP::InvalidResponseError => e
Rails.logger.error "Error for email channel - #{channel.inbox.id} : #{e.message}"
Rails.logger.error "Net::IMAP Error for email channel - #{channel.inbox.id} : #{e.message}"
rescue LockAcquisitionError
Rails.logger.error "Lock failed for #{channel.inbox.id}"
rescue StandardError => e
@@ -37,8 +37,8 @@ class Inboxes::FetchImapEmailsJob < MutexApplicationJob
process_mail(inbound_mail, channel)
end
rescue OAuth2::Error => e
Rails.logger.error "Error for email channel - #{channel.inbox.id} : #{e.message}"
channel.authorization_error!
Rails.logger.error "OAuth2::Error for email channel - #{channel.inbox.id} : #{e.message}"
# channel.authorization_error!
end
def process_mail(inbound_mail, channel)