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/15 20:13:25 UTC
[GitHub] chris-ratcliffe opened a new issue #2971: OW Controller should be more lenient about the data type of the statusCode value passed to it from the openwhisk action
chris-ratcliffe opened a new issue #2971: OW Controller should be more lenient about the data type of the statusCode value passed to it from the openwhisk action
URL: https://github.com/apache/incubator-openwhisk/issues/2971
<!--
Do NOT share passwords, credentials or other confidential information.
Before creating a new issue, please check if there is one already open that
fits the defect you are reporting.
If you open an issue and realize later it is a duplicate of a pre-existing
open issue, please close yours and add a comment to the other.
Issues can be created for either defects or enhancement requests. If you are a committer than please add the labels "bug" or "feature". If you are not a committer please make clear in the comments which one it is, so that committers can add these labels later.
If you are reporting a defect, please edit the issue description to include the
information shown below.
If you are reporting an enhancement request, please include information on what you are trying to achieve and why that enhancement would help you.
For more information about reporting issues, see
https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md#raising-issues
Use the commands below to provide key information from your environment:
You do not have to include this information if this is a feature request.
-->
## Environment details:
* Bluemix
## Steps to reproduce the issue:
1. Create a raw http ICF that returns the JSON statusCode entry as a string, like "200" or "500" instead of a numeric, like 200 or 500.
2. Execute the ICF using an HTTP REST call and you should see an error like:
```
{
"error": "Response is not valid 'message/http'.",
"code": 11061494
}
```
3. If you use an explicit .json content extension, it will work ok, and show the statusCode field as the string value.
4. Modify the code to return the statusCode as an integer.
5. Retest, and you will find that the default http extension will work now.
## Provide the expected results and outputs:
The default http extension type should work regardless of whether the statusCode is a string or a numeric.
## Provide the actual results and outputs:
The default http extension only works if the statusCode value is an integer.
## Additional information you deem important:
I am 95% sure that my code has always provided the statusCode as a string, and it was working fine up until sometime between Nov. 10 and Nov. 15, when I started seeing these errors, so perhaps the code was previously more lenient and it changed. (?)
----------------------------------------------------------------
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