You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/08/14 09:07:41 UTC

[james-project] 13/13: JAMES-3349: add handle methodError

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

commit 71a6e3bfa1f9baca3c6ea9ceab17f6ac21dce2e6
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Aug 14 16:06:52 2020 +0700

    JAMES-3349: add handle methodError
---
 .../src/main/scala/org/apache/james/jmap/model/Invocation.scala       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/model/Invocation.scala b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/model/Invocation.scala
index 5875ad8..1072310 100644
--- a/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/model/Invocation.scala
+++ b/server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/model/Invocation.scala
@@ -35,9 +35,9 @@ object Invocation {
   case class MethodCallId(value: NonEmptyString)
 
 
-  def error(errorCode: ErrorCode, description: Option[String], methodCallId: MethodCallId): Invocation = {
+  def error(errorCode: ErrorCode, description: String, methodCallId: MethodCallId): Invocation =
     Invocation(MethodName("error"),
-      Arguments(JsObject(Seq("type" -> JsString(errorCode.code), "description" -> JsString(description.getOrElse(""))))),
+      Arguments(JsObject(Seq("type" -> JsString(errorCode.code), "description" -> JsString(description)))),
       methodCallId)
 
   def error(errorCode: ErrorCode, methodCallId: MethodCallId): Invocation = Invocation(MethodName("error"),


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