diff --git a/FAQ.md b/FAQ.md index 29ceafbbe4..3f0758b8bc 100644 --- a/FAQ.md +++ b/FAQ.md @@ -712,6 +712,10 @@ The error *... Read timed out ...* means that the email server is not responding The error *... Failed to load IMAP envelope ...* is caused by a bug in the IMAP server of your provider. One or more messages could not be retrieved due to an unrecoverable error in the IMAP protocol. +The error *Account not found* means that a previously selected Gmail account was not found anymore, see also [this FAQ](#user-content-faq136). + +The error *No token on refresh* means that no token was returned on refreshing the authentication of Gmail account, see also [this FAQ](#user-content-faq136). + See [here](https://linux.die.net/man/3/connect) for what error codes like EHOSTUNREACH and ETIMEDOUT mean. Possible causes are: diff --git a/app/src/main/java/eu/faircode/email/MailService.java b/app/src/main/java/eu/faircode/email/MailService.java index 69b4a27e7d..9477f84a47 100644 --- a/app/src/main/java/eu/faircode/email/MailService.java +++ b/app/src/main/java/eu/faircode/email/MailService.java @@ -199,13 +199,13 @@ public class MailService implements AutoCloseable { am.invalidateAuthToken(type, password); String token = am.blockingGetAuthToken(account, getAuthTokenType(type), true); if (token == null) - throw new IllegalArgumentException("no token"); + throw new IllegalArgumentException("No token on refresh"); _connect(context, host, port, user, token); return token; } - throw new IllegalArgumentException("no account"); + throw new IllegalArgumentException("Account not found"); } catch (Throwable ex1) { Log.e(ex1); throw ex;