mrutkows commented on a change in pull request #113: Fix Node Express 'use()'
method by removing invalid 'err' parameter
URL:
https://github.com/apache/incubator-openwhisk-runtime-nodejs/pull/113#discussion_r260450071
##########
File path: core/nodejsActionBase/app.js
##########
@@ -38,7 +38,7 @@ app.use(bodyParser.json({ limit: "48mb" }));
app.post('/init', wrapEndpoint(service.initCode));
app.post('/run', wrapEndpoint(service.runCode));
-app.use(function(err, req, res, next) {
+app.use(function(req, res, next) {
console.error(err.stack);
Review comment:
I did find what likely someone copied verbatim for creating your own error
handler here:https://expressjs.com/en/guide/error-handling.html
but, in standalone testing the function was never called (and was called for
invalid requests with the change)...
Maybe both are needed? as an error handler and as a means to handle invalid
(endpoint) requests?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services