This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


The following commit(s) were added to refs/heads/master by this push:
     new 482ac366e3 [LOGGING] Aborting JMAP upload is too verbose (#2125)
482ac366e3 is described below

commit 482ac366e34e700e42b42eca701314bceea78e00
Author: Benoit TELLIER <btell...@linagora.com>
AuthorDate: Mon Mar 18 06:20:18 2024 +0100

    [LOGGING] Aborting JMAP upload is too verbose (#2125)
---
 .../src/main/scala/org/apache/james/jmap/core/ProblemDetails.scala    | 4 ++++
 .../org/apache/james/jmap/method/MailboxSetCreatePerformer.scala      | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/ProblemDetails.scala
 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/ProblemDetails.scala
index fc75a52d72..226fe7e32a 100644
--- 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/ProblemDetails.scala
+++ 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/core/ProblemDetails.scala
@@ -25,6 +25,7 @@ import 
org.apache.james.jmap.core.RequestLevelErrorType.{DEFAULT_ERROR_TYPE, Err
 import org.apache.james.jmap.exceptions.UnauthorizedException
 import org.apache.james.jmap.routes.UnsupportedCapabilitiesException
 import org.slf4j.{Logger, LoggerFactory}
+import reactor.netty.channel.AbortedException
 
 /**
  * Problem Details for HTTP APIs within the JMAP context
@@ -40,6 +41,9 @@ object ProblemDetails {
   val LOGGER: Logger = LoggerFactory.getLogger(classOf[ProblemDetails])
 
   def forThrowable(throwable: Throwable): ProblemDetails = throwable match {
+    case exception: AbortedException =>
+      LOGGER.info("The connection was aborted: {}", exception.getMessage)
+      ProblemDetails(status = INTERNAL_SERVER_ERROR, detail = 
exception.getMessage)
     case exception: IllegalArgumentException =>
       LOGGER.info("The request was successfully parsed as JSON but did not 
match the type signature of the Request object: {}", exception.getMessage)
       notRequestProblem(
diff --git 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MailboxSetCreatePerformer.scala
 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MailboxSetCreatePerformer.scala
index 5aae0b99d4..3eacaf1a4b 100644
--- 
a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MailboxSetCreatePerformer.scala
+++ 
b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/method/MailboxSetCreatePerformer.scala
@@ -40,7 +40,7 @@ import reactor.core.scala.publisher.{SFlux, SMono}
 import scala.util.Try
 
 object MailboxSetCreatePerformer {
-  private val LOGGER = 
LoggerFactory.getLogger(classOf[EmailSetCreatePerformer])
+  private val LOGGER = 
LoggerFactory.getLogger(classOf[MailboxSetCreatePerformer])
   sealed trait MailboxCreationResult {
     def mailboxCreationId: MailboxCreationId
   }


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

Reply via email to