@altipla/express-errors
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

express-errors

Debug errors while developing with Express.

Installation

$ npm install @altipla/express-errors

Usage

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)

Readme

Keywords

none

Package Sidebar

Install

npm i @altipla/express-errors

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

17.8 kB

Total Files

5

Last publish

Collaborators

  • ernestoalejo