Socket
Book a DemoInstallSign in
Socket

crashpad

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crashpad

Express middleware for Boom errors

2.0.1
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

Crashpad

Express middleware for [Boom][boom] errors

NPM version Build Status MIT License

Usage

Install this middleware and stop explicitly responding with errors from your application code!

npm install crashpad
var crashpad = require('crashpad');
var Boom = require('boom');

app.get('/error', function(req, res, next) {
  throw Boom.expectationFailed();
});

app.use(crashpad());

Crashpad will handle:

  • Errors created by the Boom module. ([See Boom documentation for a list of these][boom].)
  • Error objects that have an integer "status" or "statusCode" attribute.
  • Generic error objects (will respond with 500).

Right now Crashpad just sends back JSON payloads. Eventually, we'll have support for fancy rendered error pages! If you need something like that now, check out express-error-handler.

Contributing

Please follow our Code of Conduct when contributing to this project.

$ git clone https://github.com/goodeggs/crashpad && cd crashpad
$ yarn install
$ yarn test

Releasing

To release a new version of this module, use yarn to bump the version in package.json and create a git tag, then push. This will automatically get published to the NPM registry via CI.

yarn version --new-version=<major|minor|patch|premajor|preminor|prepatch>
git push --follow-tags

Keywords

express boom

FAQs

Package last updated on 02 Nov 2021

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.