fix: call authorization_error! on IMAP auth failures (#13560) (revert) (#13671)

This reverts commit 7acd239c70 to further
debug upstream issues.
This commit is contained in:
Sojan Jose
2026-02-26 18:45:18 -08:00
committed by GitHub
parent bdcc62f1b0
commit d84ae196d5
13 changed files with 14 additions and 218 deletions

View File

@@ -1 +0,0 @@
class Imap::AuthenticationError < StandardError; end

View File

@@ -107,11 +107,7 @@ class Imap::BaseFetchEmailService
def build_imap_client
imap = Net::IMAP.new(channel.imap_address, port: channel.imap_port, ssl: true)
begin
imap.authenticate(authentication_type, channel.imap_login, imap_password)
rescue Net::IMAP::NoResponseError => e
raise Imap::AuthenticationError, e.message
end
imap.authenticate(authentication_type, channel.imap_login, imap_password)
imap.select('INBOX')
imap
end