Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

setup error handler in express framework

app.use((err, req, res, next) => {
  console.error(err.stack)
  res.status(500).send('Something broke!')
})
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #setup #error #handler #express #framework
ADD COMMENT
Topic
Name
1+7 =