
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
unhandled-error
Advanced tools
Catches every uncaught error, whether synchronous or not, for easier logging
A small utility for tracking unhandled errors of all varieties.
This library only takes care of collecting errors. If you want to receive e-mail notifications when an unhandled error occurs, you'll probably want to use the higher-level report-errors tool instead.
This library does not yet support browser usage, but this is planned for a future version.
WTFPL or CC0, whichever you prefer. A donation and/or attribution are appreciated, but not required.
Maintaining open-source projects takes a lot of time, and the more donations I receive, the more time I can dedicate to open-source. If this module is useful to you, consider making a donation!
You can donate using Bitcoin, PayPal, Flattr, cash-in-mail, SEPA transfers, and pretty much anything else. Thank you!
Pull requests welcome. Please make sure your modifications are in line with the overall code style, and ensure that you're editing the files in src/, not those in lib/.
Build tool of choice is gulp; simply run gulp while developing, and it will watch for changes.
Be aware that by making a pull request, you agree to release your modifications under the licenses stated above.
const unhandledError = require("unhandled-error");
let errorReporter = unhandledError((error, context) => {
logSomehow(error, context);
});
Automatically collects all unhandled errors, and forwards them to the specified handler before crashing the process.
promise, which is included for unhandled Promise rejections and indicates the Promise that the error originated from. You'll usually want to store the context verbatim, for later inspection.true, it prevents the library from crashing your process after an error is reported. This is extremely dangerous, and you should only use it if you are fully aware of the consequences. Defaults to false.Returns a new errorReporter, that you can report errors on.
WARNING: Note that as soon as you call unhandledError, it will start intercepting errors, and things like the default uncaughtException handler will no longer fire!
Manually reports an error with the given context. It will be treated the same as any automatically caught errors.
req and res here. There is no standard set of keys/values to use here - include whatever information you feel is important to reproduce the error, as long as it's JSON-serializable; circular references are fine.FAQs
Catches every uncaught error, whether synchronous or not, for easier logging
The npm package unhandled-error receives a total of 26 weekly downloads. As such, unhandled-error popularity was classified as not popular.
We found that unhandled-error demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.