rabbah commented on a change in pull request #3262: Handle trigger activations 
with inactive rules
URL: 
https://github.com/apache/incubator-openwhisk/pull/3262#discussion_r168788377
 
 

 ##########
 File path: core/controller/src/main/scala/whisk/core/controller/Triggers.scala
 ##########
 @@ -146,9 +147,14 @@ trait WhiskTriggersApi extends WhiskCollectionAPI {
                 case Failure(t) =>
                   logging.error(this, s"[POST] storing trigger activation 
$triggerActivationId failed: ${t.getMessage}")
               }
+            complete(Accepted, triggerActivationId.toJsObject)
+          } else {
+            logging
+              .info(
+                this,
+                s"[POST] trigger without an active rule was activated; no 
trigger activation record created for $triggerActivationId")
+            complete(NoContent)
 
 Review comment:
   we could add a message here so that the HTTP resonse status code is 
NoContent and the message is informative: Trigger has no associated rules that 
are active.

----------------------------------------------------------------
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