node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



Smoothly pass errors through your connect application.


First of all install this module with npm install connect-error.

var connect = require('connect'),
    connectError = require('connect-error');

app = connect()
  .use(function (req, res) {
    // create a correct error object and pass it to our error handler
    res.error('example error');
  .use(function (err, req, res, next) {
    // err is a clean `Error` instance with a `stack` property.
    // application flow will jump directly to this error handler.


  • Add filter support for whenever errors appear (allow airbreak, string manipulation and substitution or other things)