Skip to content

Handle authentication errors better #2

@9034725985

Description

@9034725985

Looks like we assume that the authentication is always correct and retry every time.
We need to revisit this in the future.

info: MyImapDownloader.EmailDownloadService[0]
      Connecting to IMAP server mail.mailo.com:993
fail: MyImapDownloader.EmailDownloadService[0]
      Error during email download batch operation
      MailKit.Security.AuthenticationException: Authenticate error
         at MailKit.Net.Imap.ImapClient.AuthenticateAsync(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
         at MyImapDownloader.EmailDownloadService.ConnectToImapServerAsync(ImapClient client, CancellationToken cancellationToken) in /home/kushal/src/dotnet/MyImapDownloader/MyImapDownloader/EmailDownloadService.cs:line 123
         at MyImapDownloader.EmailDownloadService.<>c__DisplayClass5_0.<<DownloadEmailsAsync>b__0>d.MoveNext() in /home/kushal/src/dotnet/MyImapDownloader/MyImapDownloader/EmailDownloadService.cs:line 69
info: MyImapDownloader.EmailDownloadService[0]
      Disconnected from IMAP server
info: MyImapDownloader.EmailDownloadService[0]
      Connecting to IMAP server mail.mailo.com:993

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions