New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

express-async-error

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-async-error

expressjs asynchronous error handler

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

express-async-error

Expressjs handles error on try/catch basis, which is very helpful, but doesn't take care of asynchronous errors (errors in callbacks). This middleware handles those with usage of domains.

npm install express-async-error

Installation

All you need to do is add handler like this:

var express = require('express');
var errorHandler = require('express-async-error').Handler

var app = new express()

app.use(errorHandler([options]))

...

app.listen(...)

Arguments

  • options:
    • domainPropertyName: name of property to assign created domain (default: _domain)

See tests for complete usage example.

TODO

  • subdomain support

Keywords

expressjs,async,asynchronous,error,handling,domain

FAQs

Package last updated on 09 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts