You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwhisk.apache.org by gi...@git.apache.org on 2017/05/12 20:11:43 UTC

[GitHub] mdeuser opened a new issue #2237: web action should not return 200 status on action error

mdeuser opened a new issue #2237: web action should not return 200 status on action error
URL: https://github.com/apache/incubator-openwhisk/issues/2237
 
 
   ## Environment details:
   
   * local deployment, vagrant
   
   ## Steps to reproduce the issue:
   
   1.   Create an action called testrej with `function main(m) { return Promise.reject({error:'bad news!'}); }`
   2.   Invoke as regular action: `wsk action invoke testrej -b -v`
   3.   Invoke as web action: `curl -v http://YOURHOST/api/v1/experimental/web/guest/default/testrej.json`
   4.  Observe the HTTP response code in (2) and (3)
   
   ## Provide the expected results and outputs:
   
   Both response codes are 502
   
   ## Provide the actual results and outputs:
   
   Response code for (2) is 502.  Response code for (3) is 200
   
   ## Additional information you deem important:
   * Possibly a related issue.. actions invoked as standard actions have their `return Promise.reject(string)` results automatically encapsulated into the appropriate activation JSON structure for consumption by the caller. However, when the same action is invoked as a .json web action, the response code is 400 (not valid application/json) - having a similar automatic encapsulation for strings (and even objects) would be helpful (i.e. `{ error: RESPONSE}`) with 502 status code.
   
   
 
----------------------------------------------------------------
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