[geary/mjog/imap-connection-fixes: 28/34] Geary.ImapError: Add new OPERATIONAL_ERROR code
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/imap-connection-fixes: 28/34] Geary.ImapError: Add new OPERATIONAL_ERROR code
- Date: Thu, 26 Mar 2020 21:33:33 +0000 (UTC)
commit 31e052987eaf0f79b34b0a4243f05c0f6170d731
Author: Michael Gratton <mike vee net>
Date: Thu Mar 26 22:12:55 2020 +1100
Geary.ImapError: Add new OPERATIONAL_ERROR code
Used to indicate a NO response from an IMAP server when there is no
more appropriate error.
Mark it as being a recoverable failure so that the replay queue will
re-try the command which is useful for #502, since a NO is followed
immediately by a BYE, but we don't get any useful indication that the
NO is because the connection has become unavailable.
src/engine/imap-engine/imap-engine.vala | 1 +
src/engine/imap/imap-error.vala | 19 ++++++++++++++++---
2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/imap-engine/imap-engine.vala b/src/engine/imap-engine/imap-engine.vala
index 5f5e926c..36279e7d 100644
--- a/src/engine/imap-engine/imap-engine.vala
+++ b/src/engine/imap-engine/imap-engine.vala
@@ -27,6 +27,7 @@ namespace Geary.ImapEngine {
err is IOError.NOT_CONNECTED ||
err is IOError.TIMED_OUT ||
err is ImapError.NOT_CONNECTED ||
+ err is ImapError.OPERATIONAL_ERROR ||
err is ImapError.TIMED_OUT ||
err is ImapError.UNAVAILABLE
);
diff --git a/src/engine/imap/imap-error.vala b/src/engine/imap/imap-error.vala
index 8e467556..d837464c 100644
--- a/src/engine/imap/imap-error.vala
+++ b/src/engine/imap/imap-error.vala
@@ -31,12 +31,22 @@ public errordomain Geary.ImapError {
*/
ALREADY_CONNECTED,
+ /**
+ * A request failed due to an explicit NO response.
+ *
+ * An explicit NO response is defined per RFC 3501 §7.1.2.
+ *
+ * See [[https://tools.ietf.org/html/rfc3501#section-7.1.2]].
+ */
+ OPERATIONAL_ERROR,
+
/**
* A request failed due to an explicit or implicit BAD response.
*
- * An explicit BAD response is as per RFC 3501 §7.3.1. An implicit
- * BAD response is when the server returns an unexpected response,
- * for example, sends a status response for the same command twice.
+ * An explicit BAD response is defined as per RFC 3501 §7.1.3. An
+ * implicit BAD response is when the server returns an unexpected
+ * response, for example, sends a status response for the same
+ * command twice.
*
* See [[https://tools.ietf.org/html/rfc3501#section-7.1.3]].
*/
@@ -46,14 +56,17 @@ public errordomain Geary.ImapError {
* Indicates that an operation could not proceed without prior authentication.
*/
UNAUTHENTICATED,
+
/**
* An operation is not supported by the IMAP stack or by the server.
*/
NOT_SUPPORTED,
+
/**
* Indicates a basic parsing error, semantic in nature.
*/
INVALID,
+
/**
* A network connection of some kind failed due to an expired timer.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]