is it okay to attach an err to req nodejs code example
Example 1: express error handling
app.use(function (err, req, res, next) {
console.error(err.stack)
res.status(500).send('Something broke!')
})
Example 2: error * route
app.get('*', (request, response) => response.status(404).send('This route does not exist'));