Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whisk CLI fails with a cannot invoke action error if 1 of your keys is named response #2757

Closed
sroorda opened this issue Sep 15, 2017 · 1 comment

Comments

@sroorda
Copy link

sroorda commented Sep 15, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants