Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 98CE5160C15 for ; Wed, 3 Jan 2018 14:35:28 +0100 (CET) Received: (qmail 78542 invoked by uid 500); 3 Jan 2018 13:35:27 -0000 Mailing-List: contact commits-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list commits@openwhisk.apache.org Received: (qmail 78533 invoked by uid 99); 3 Jan 2018 13:35:27 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2018 13:35:27 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 3AEB8850C9; Wed, 3 Jan 2018 13:35:26 +0000 (UTC) Date: Wed, 03 Jan 2018 13:35:26 +0000 To: "commits@openwhisk.apache.org" Subject: [incubator-openwhisk] branch master updated: Refine error message on failure to fetch action in invoker. (#3139) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151498652599.9551.7002280459675571690@gitbox.apache.org> From: dubeejw@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-openwhisk X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 6de269440b8ccc20bb1e21de0f81e8a727921d56 X-Git-Newrev: eb206069b88dd1e103f7b9fbf809820afc8d2943 X-Git-Rev: eb206069b88dd1e103f7b9fbf809820afc8d2943 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Wed, 03 Jan 2018 13:35:29 -0000 This is an automated email from the ASF dual-hosted git repository. dubeejw pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git The following commit(s) were added to refs/heads/master by this push: new eb20606 Refine error message on failure to fetch action in invoker. (#3139) eb20606 is described below commit eb206069b88dd1e103f7b9fbf809820afc8d2943 Author: rodric rabbah AuthorDate: Wed Jan 3 08:35:23 2018 -0500 Refine error message on failure to fetch action in invoker. (#3139) --- common/scala/src/main/scala/whisk/http/ErrorResponse.scala | 1 + .../src/main/scala/whisk/core/invoker/InvokerReactive.scala | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/common/scala/src/main/scala/whisk/http/ErrorResponse.scala b/common/scala/src/main/scala/whisk/http/ErrorResponse.scala index 9ce5c45..8dcfe20 100644 --- a/common/scala/src/main/scala/whisk/http/ErrorResponse.scala +++ b/common/scala/src/main/scala/whisk/http/ErrorResponse.scala @@ -187,6 +187,7 @@ object Messages { val actionRemovedWhileInvoking = "Action could not be found or may have been deleted." val actionMismatchWhileInvoking = "Action version is not compatible and cannot be invoked." + val actionFetchErrorWhileInvoking = "Action could not be fetched." } /** Replaces rejections with Json object containing cause and transaction id. */ diff --git a/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala b/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala index 1a772b9..c885c85 100644 --- a/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala +++ b/core/invoker/src/main/scala/whisk/core/invoker/InvokerReactive.scala @@ -47,7 +47,7 @@ import whisk.core.containerpool.ContainerProxy import whisk.core.containerpool.PrewarmingConfig import whisk.core.containerpool.Run import whisk.core.containerpool.logging.LogStoreProvider -import whisk.core.database.NoDocumentException +import whisk.core.database._ import whisk.core.entity._ import whisk.core.entity.size._ import whisk.http.Messages @@ -201,8 +201,12 @@ class InvokerReactive(config: WhiskConfig, instance: InstanceId, producer: Messa // making this an application error. All other errors are considered system // errors and should cause the invoker to be considered unhealthy. val response = t match { - case _: NoDocumentException => ActivationResponse.applicationError(Messages.actionRemovedWhileInvoking) - case _ => ActivationResponse.whiskError(Messages.actionMismatchWhileInvoking) + case _: NoDocumentException => + ActivationResponse.applicationError(Messages.actionRemovedWhileInvoking) + case _: DocumentTypeMismatchException | _: DocumentUnreadable => + ActivationResponse.whiskError(Messages.actionMismatchWhileInvoking) + case _ => + ActivationResponse.whiskError(Messages.actionFetchErrorWhileInvoking) } val now = Instant.now val causedBy = if (msg.causedBySequence) { -- To stop receiving notification emails like this one, please contact ['"commits@openwhisk.apache.org" '].