You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/04/14 10:55:26 UTC

[GitHub] [james-project] quantranhong1999 commented on a diff in pull request #941: JAMES-3737 POC Reactive IMAP implementation

quantranhong1999 commented on code in PR #941:
URL: https://github.com/apache/james-project/pull/941#discussion_r850325069


##########
protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java:
##########
@@ -57,16 +57,19 @@ protected Mono<Void> processRequestReactive(DeleteRequest request, ImapSession s
             .then(unsolicitedResponses(session, responder, false))
             .then(Mono.fromRunnable(() -> okComplete(request, responder)))
             .then()
+            .doOnEach(logOnError(MailboxNotFoundException.class, e -> LOGGER.debug("Delete failed for mailbox {} as it doesn't exist", mailboxPath, e)))
             .onErrorResume(MailboxNotFoundException.class, e -> {
                 LOGGER.debug("Delete failed for mailbox {} as it doesn't exist", mailboxPath, e);
                 no(request, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX);
                 return Mono.empty();
             })
+            .doOnEach(logOnError(TooLongMailboxNameException.class, e -> LOGGER.debug("The mailbox name length is over limit: {}", mailboxPath.getName(), e)))
             .onErrorResume(TooLongMailboxNameException.class, e -> {
                 LOGGER.debug("The mailbox name length is over limit: {}", mailboxPath.getName(), e);
                 taggedBad(request, responder, HumanReadableText.FAILURE_MAILBOX_NAME);
                 return Mono.empty();
             })
+            .doOnEach(logOnError(MailboxException.class, e -> LOGGER.error("Delete failed for mailbox {}", mailboxPath, e)))
             .onErrorResume(MailboxException.class, e -> {
                 LOGGER.error("Delete failed for mailbox {}", mailboxPath, e);

Review Comment:
   idem



##########
protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java:
##########
@@ -57,16 +57,19 @@ protected Mono<Void> processRequestReactive(DeleteRequest request, ImapSession s
             .then(unsolicitedResponses(session, responder, false))
             .then(Mono.fromRunnable(() -> okComplete(request, responder)))
             .then()
+            .doOnEach(logOnError(MailboxNotFoundException.class, e -> LOGGER.debug("Delete failed for mailbox {} as it doesn't exist", mailboxPath, e)))
             .onErrorResume(MailboxNotFoundException.class, e -> {
                 LOGGER.debug("Delete failed for mailbox {} as it doesn't exist", mailboxPath, e);

Review Comment:
   We should remove this line? (already logged in doOnEach)



##########
protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java:
##########
@@ -57,16 +57,19 @@ protected Mono<Void> processRequestReactive(DeleteRequest request, ImapSession s
             .then(unsolicitedResponses(session, responder, false))
             .then(Mono.fromRunnable(() -> okComplete(request, responder)))
             .then()
+            .doOnEach(logOnError(MailboxNotFoundException.class, e -> LOGGER.debug("Delete failed for mailbox {} as it doesn't exist", mailboxPath, e)))
             .onErrorResume(MailboxNotFoundException.class, e -> {
                 LOGGER.debug("Delete failed for mailbox {} as it doesn't exist", mailboxPath, e);
                 no(request, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX);
                 return Mono.empty();
             })
+            .doOnEach(logOnError(TooLongMailboxNameException.class, e -> LOGGER.debug("The mailbox name length is over limit: {}", mailboxPath.getName(), e)))
             .onErrorResume(TooLongMailboxNameException.class, e -> {
                 LOGGER.debug("The mailbox name length is over limit: {}", mailboxPath.getName(), e);

Review Comment:
   idem



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org