0.1.0 • Published 3 years ago
@altipla/express-errors v0.1.0
express-errors
Debug errors while developing with Express.
Installation
$ npm install @altipla/express-errorsUsage
Add the handler always at the very end of the middleware chain. It does not propagate the error, so any middleware below it will not be called.
import express from 'express'
import { errorHandler } from '@altipla/express-errors'
const app = express()
app.get('/', (req, res) => {
throw new Error('Something went wrong')
});
// (..add more routes here...)
app.use(errorHandler)0.1.0
3 years ago