Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apache/openwhisk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: rabbah/openwhisk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 23, 2020

  1. Scalaism.

    rabbah committed Feb 23, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    eb174d8 View commit details
Showing with 3 additions and 8 deletions.
  1. +3 −8 common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@

package org.apache.openwhisk.core.connector

import scala.util.{Failure, Success, Try}
import scala.util.Try
import spray.json._
import org.apache.openwhisk.common.TransactionId
import org.apache.openwhisk.core.entity._
@@ -355,13 +355,8 @@ object Activation extends DefaultJsonProtocol {
.getFieldPath(result.get.asJsObject, ERROR_FIELD, "statusCode")
.orElse(JsHelpers.getFieldPath(result.get.asJsObject, "statusCode"))

statusCode match {
case Some(value) =>
Try { value.convertTo[BigInt].intValue() } match {
case Failure(_) => Some(BadRequest.intValue)
case Success(code) => Some(code)
}
case None => None
statusCode.map {
case value => Try(value.convertTo[BigInt].intValue).toOption.getOrElse(BadRequest.intValue)
}
}