Closed jkyberneees closed 5 years ago
Supporting global error handler overwrite:
const service = require('restana')({ errorHandler (err, req, res) { console.log(`Unexpected error: ${err.message}`) res.send(err) } }) service.get('/throw', (req, res) => { throw new Error('Upps!') }) service.start()
Supporting global error handler overwrite: