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 a18140fe69 [FIX] JMAP: Return 408 upon AbortedException
a18140fe69 is described below
commit a18140fe69d3858a6aa973c7240469c183241341
Author: Benoit TELLIER <[email protected]>
AuthorDate: Fri Jan 10 11:22:09 2025 +0100
[FIX] JMAP: Return 408 upon AbortedException
---
.../src/main/scala/org/apache/james/jmap/core/ProblemDetails.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 8a04d41537..08bbec131b 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
@@ -20,7 +20,7 @@ package org.apache.james.jmap.core
import com.fasterxml.jackson.core.JsonParseException
import io.netty.handler.codec.http.HttpResponseStatus
-import io.netty.handler.codec.http.HttpResponseStatus.{BAD_REQUEST,
INTERNAL_SERVER_ERROR, UNAUTHORIZED}
+import io.netty.handler.codec.http.HttpResponseStatus.{BAD_REQUEST,
INTERNAL_SERVER_ERROR, REQUEST_TIMEOUT, UNAUTHORIZED}
import org.apache.james.jmap.core.RequestLevelErrorType.{DEFAULT_ERROR_TYPE,
ErrorTypeIdentifier}
import org.apache.james.jmap.exceptions.UnauthorizedException
import org.apache.james.jmap.routes.{RequestSizeExceeded,
StreamConstraintsExceptionWithInput, TooManyCallsInRequest,
UnsupportedCapabilitiesException}
@@ -44,7 +44,7 @@ object 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)
+ ProblemDetails(status = REQUEST_TIMEOUT, 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(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]