mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 18:22:53 +00:00
Fix: prevent IMAPBadResponse exception from sending the authorization mail (#7154)
This commit is contained in:
@@ -7,9 +7,10 @@ class Inboxes::FetchImapEmailsJob < ApplicationJob
|
||||
return unless should_fetch_email?(channel)
|
||||
|
||||
process_email_for_channel(channel)
|
||||
rescue *ExceptionList::IMAP_EXCEPTIONS
|
||||
rescue *ExceptionList::IMAP_EXCEPTIONS => e
|
||||
Rails.logger.error e
|
||||
channel.authorization_error!
|
||||
rescue EOFError, OpenSSL::SSL::SSLError => e
|
||||
rescue EOFError, OpenSSL::SSL::SSLError, Net::IMAP::NoResponseError => e
|
||||
Rails.logger.error e
|
||||
rescue StandardError => e
|
||||
ChatwootExceptionTracker.new(e, account: channel.account).capture_exception
|
||||
|
||||
@@ -12,7 +12,7 @@ module ExceptionList
|
||||
].freeze
|
||||
|
||||
IMAP_EXCEPTIONS = [
|
||||
Errno::ECONNREFUSED, Net::OpenTimeout, Net::IMAP::NoResponseError,
|
||||
Errno::ECONNREFUSED, Net::OpenTimeout,
|
||||
Errno::ECONNRESET, Errno::ENETUNREACH, Net::IMAP::ByeResponseError,
|
||||
SocketError
|
||||
].freeze
|
||||
|
||||
Reference in New Issue
Block a user