File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract
jmap-rfc-8621/src/main/scala/org/apache/james/jmap/pushsubscription Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -2373,7 +2373,7 @@ trait PushSubscriptionSetMethodContract {
23732373 | "notCreated": {
23742374 | "4f29": {
23752375 | "type": "serverFail",
2376- | "description": "Error when call to Push Server. "
2376+ | "description": "Error when call to Push Server: code 500 . "
23772377 | }
23782378 | }
23792379 | },
Original file line number Diff line number Diff line change @@ -65,9 +65,9 @@ object WebPushClientHeader {
6565
6666sealed abstract class WebPushException (message : String ) extends RuntimeException (message)
6767
68- case class WebPushInvalidRequestException (detailError : String ) extends WebPushException (s " Bad request when call to Push Server. ${ detailError} " )
68+ case class WebPushInvalidRequestException (detailError : String ) extends WebPushException (s " Bad request when call to Push Server. $detailError" )
6969
70- case class WebPushTemporarilyUnavailableException (detailError : String ) extends WebPushException (s " Error when call to Push Server. ${ detailError} " )
70+ case class WebPushTemporarilyUnavailableException (httpCode : Int , detailError : String ) extends WebPushException (s " Error when call to Push Server: code $httpCode . $detailError" )
7171
7272object DefaultWebPushClient {
7373 val PUSH_SERVER_ERROR_RESPONSE_MAX_LENGTH : Int = 1024
@@ -131,8 +131,8 @@ class DefaultWebPushClient @Inject()(configuration: PushClientConfiguration) ext
131131 case HttpResponseStatus .CREATED => Mono .empty()
132132 case HttpResponseStatus .BAD_REQUEST => preProcessingData(dataBuf)
133133 .flatMap(string => Mono .error(WebPushInvalidRequestException (string)))
134- case _ => preProcessingData(dataBuf)
135- .flatMap(string => Mono .error(WebPushTemporarilyUnavailableException (string)))
134+ case statusCode : HttpResponseStatus => preProcessingData(dataBuf)
135+ .flatMap(string => Mono .error(WebPushTemporarilyUnavailableException (statusCode.code, string)))
136136 }.`then`()
137137
138138 private def preProcessingData (dataBuf : ByteBufMono ): Mono [String ] =
You can’t perform that action at this time.
0 commit comments