Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

writing custom error handler in expressjs

app.use((err, req, res, next) => {
  console.error(err)
  res.status(500).send('Something broke!')
})
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #writing #custom #error #handler #expressjs
ADD COMMENT
Topic
Name
2+6 =