Closed bokova closed 7 years ago
We could go in this direction: https://expressjs.com/en/guide/error-handling.html
The error is caused by the Express middleware throwing the error
In any controller use a variable / function name that hasn't been initialized. Eg.:
edit the code within any route definition such:
app.get('/login', function(req, res, next) {
});
app.get('/login', function(req, res, next) {
funkyFunction(); //this is the nonexistent function
});
Errors should not be leaked to the browser at all but instead logged into the console.
I guess we'd like to stop leaking these errors. Eg. not having the proper view lead to the error: