Open kturcios opened 5 years ago
The following code snippet should return a 501 status code along with the error message.
module.exports = (event, context) => { context .status(501) .fail('An error occurred'); }
The snippet is returning the default 500 status code along with the error message.
Modify the fail method inside index.js to use this.value
this.value
fail(value) { let message; this.cb(this.value, message); }
Create a handler that returns the following
I am trying to create a stateless microservice that returns proper status codes.
faas-cli version: 0.8.3 docker version: 18.09.1 OS: MacOS
0.8.3
18.09.1
MacOS
Please can you move this to the node10-express repo?
Expected Behaviour
The following code snippet should return a 501 status code along with the error message.
Current Behaviour
The snippet is returning the default 500 status code along with the error message.
Possible Solution
Modify the fail method inside index.js to use
this.value
Steps to Reproduce (for bugs)
Create a handler that returns the following
Context
I am trying to create a stateless microservice that returns proper status codes.
Your Environment
faas-cli version:
0.8.3
docker version:18.09.1
OS:MacOS