rabbah commented on a change in pull request #3799: Display proper error when 
sequence invocation fails due to missing component
URL: 
https://github.com/apache/incubator-openwhisk/pull/3799#discussion_r201860889
 
 

 ##########
 File path: 
core/controller/src/main/scala/whisk/core/controller/actions/SequenceActions.scala
 ##########
 @@ -280,6 +276,9 @@ protected[actions] trait SequenceActions {
         // since all throwables are recovered with a failed accounting 
instance and this is
         // in turned boxed to FailedSequenceActivation
         case FailedSequenceActivation(accounting) => 
Future.successful(accounting)
+        case _: NoDocumentException =>
+          Future.successful(
+            
initialAccounting.fail(ActivationResponse.applicationError(sequenceComponentNotFound),
 None))
 
 Review comment:
   I'm wrong - looking deeper:
   
   ```
   val resolvedFutureActions = resolveDefaultNamespace(components, user) map { 
c =>
         WhiskActionMetaData.resolveActionAndMergeParameters(entityStore, c)
       }
   ```
   
   Will resolve all the components first and so if the future fails with a no 
doc exception, it is safe to use the initial accounting object. The placement 
of the recover with is dangerous though (for the reason I initially thought it 
was incorrect).
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to