You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/11/22 00:39:15 UTC

[GitHub] csantanapr opened a new issue #129: Invoking action via CLI with the -b and -r options gives non-zero exit code

csantanapr opened a new issue #129: Invoking action via CLI with the -b and -r options gives non-zero exit code
URL: https://github.com/apache/incubator-openwhisk-cli/issues/129
 
 
   @mdeuser commented on [Mon Aug 14 2017](https://github.com/apache/incubator-openwhisk/issues/2617)
   
   ## Environment details:
   
   * Bluemix
   
   ## Steps to reproduce the issue:
   
   1.   Create an action (normal action or web action) that returns a promise that's resolved with a JSON object
   ```
   function main(args) {
      return new Promise((resolve, reject) => {
          resolve({"response":{"SomeField":1}});
      });
   }
   ```
   2.  Invoke the action via CLI using the `-b` and `-r` options
   3.  Compare results to invoking action with just the `-b` option
   
   
   ## Provide the expected results and outputs:
   Exit code of 0 and output:
   ```
   {
     "response": {
       "SomeField": 1
     }
   }
   ```
   
   
   ## Provide the actual results and outputs:
   Exit code of -56 and output:
   ```
   error: Unable to invoke action 'YOUR-ACTION': The connection failed, or timed out. (HTTP status code 200)
   Run 'wsk --help' for usage.
   ```
   
   
   
   
   ---
   
   @cfjedimaster commented on [Mon Aug 14 2017](https://github.com/apache/incubator-openwhisk/issues/2617#issuecomment-322190385)
   
   To add a bit more context, it seems to revolve around the name of the key and the value. When I change "response" to anything else, it works. If I change the value to a simple string, it works. If I change the value to an array, it works. As soon as I use: "reponse":{ ...} it fails via the CLI. The code runs 100% fine though. In my original code, I was using Twitter's API to send out a tweet and it ran fine, it's just the error in the CLI.
   
   ---
   
   @rabbah commented on [Mon Aug 14 2017](https://github.com/apache/incubator-openwhisk/issues/2617#issuecomment-322190960)
   
   I'll guess this has to do with the cli searching for "response" which is also part of the schema for an activation. 
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services