Skip to content

Commit af10b79

Browse files
Update some return errors
1 parent 584e137 commit af10b79

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/controller/src/main/scala/org/apache/openwhisk/core/controller/Actions.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with
242242
complete(OK, version)
243243
})
244244
case Success(_) =>
245-
terminate(Forbidden, s"[PUT] entity doesn't has version $version")
245+
terminate(NotFound, s"[PUT] entity doesn't has version $version")
246246
case Failure(_) =>
247247
terminate(InternalServerError)
248248
}
@@ -551,8 +551,8 @@ trait WhiskActionsApi extends WhiskCollectionAPI with PostActionActivation with
551551
onComplete(WhiskActionVersionList.get(entityName, entityStore)) {
552552
case Success(res) =>
553553
complete(OK, res)
554-
case Failure(t) =>
555-
terminate(Forbidden, forbiddenGetAction(entityName.path.asString))
554+
case Failure(_) =>
555+
terminate(InternalServerError)
556556
}
557557
//check if execute only is enabled, and if there is a discrepancy between the current user's namespace
558558
//and that of the entity we are trying to fetch

tests/src/test/scala/org/apache/openwhisk/core/controller/test/ActionsApiTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ class ActionsApiTests extends ControllerTestCommon with WhiskActionsApi {
16161616

16171617
Put(s"$collectionPath/${action.name}?defaultVersion=0.0.2", content) ~> Route.seal(routes(creds)) ~> check {
16181618
deleteAction(action.docid)
1619-
status should be(Forbidden)
1619+
status should be(NotFound)
16201620
}
16211621
}
16221622

0 commit comments

Comments
 (0)