You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/09/15 16:11:07 UTC
[GitHub] sroorda opened a new issue #2757: Whisk CLI fails with a `cannot invoke action` error if 1 of your keys is named `response`
sroorda opened a new issue #2757: Whisk CLI fails with a `cannot invoke action` error if 1 of your keys is named `response`
URL: 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
```
bx 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
```
bx 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:
users@infra.apache.org
With regards,
Apache Git Services