csantanapr opened a new issue #128: Whisk CLI fails with a `cannot invoke 
action` error if 1 of your keys is named `response`
URL: https://github.com/apache/incubator-openwhisk-cli/issues/128
 
 
   @sroorda commented on [Fri Sep 15 
2017](https://github.com/apache/incubator-openwhisk/issues/2757)
   
   ## Environment details:
   
   * local deployment, vagrant, native ubuntu, Mac OS, Bluemix, ...   
   * version of docker, vagrant, ubuntu, ...
   Deployed to Bluemix api.ng.bluemix.net
   
   It appears that if you invoke your Cloud Function via the CLI it will fail 
with 
   `error: Unable to invoke action 'nestedDictionaryError': The connection 
failed, or timed out. (HTTP status code 200)` if you include a key labeled 
`response` in your output.
   
   ## Steps to reproduce the issue:
   Create the following Cloud Function in python
   ```
   def main(args):
       result = {'message': 'error result', 'response': {'key1': 
'value1','key2': 'value2' }}
   
       if args and args['resultType'] and args['resultType'] == 'error':
           return {'message': 'error result', 'response': {'key1': 
'value1','key2': 'value2' }}
       else:
           return {'message': 'error result', 'not_response': {'key1': 
'value1', 'key2': 'value2'}}
   ```
   
   ## Provide the expected results and outputs:
   ## Provide the actual results and outputs:
   Fails
   ```
   wsk action invoke --result nestedDictionaryError --param resultType "error"
   error: Unable to invoke action 'nestedDictionaryError': The connection 
failed, or timed out. (HTTP status code 200)
   Run 'wsk --help' for usage.
   ```
   
   Works
   ```
   wsk action invoke --result nestedDictionaryError
   {
       "message": "error result",
       "not_response": {
           "key1": "value1",
           "key2": "value2"
       }
   }
   ```
   
   Even if response is reserved we should get a better message than that.
   
   ## Additional information you deem important:
   * issue happens only occasionally or under certain circumstances   
   * changes you did or observed in the environment
   
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to