
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.
error-deets
Advanced tools
An extension of vanilla JS errors, that adds two fields:
There are a few good reasons to add these fields to a standard error object.
Resuable error objects were few and far in-between in the author's experience with build complex nodejs projects.
custom errors, that extend the base error object, while a nobel thought, are too much work for a single use error objects. When absolutely needed, the .code property, set to a unique value suffices.
In most cases of error, passing an error message with some details from the execution context suffices to provide debuggable hints. Further, using logging solutions like winston, it's easy to log these to any log collector. log.error(err.message, err.details);
Ooh, and this is developed in TypeScript, because it rocks!
npm install error-deets
Throwing an error
import { ErrorDeets as Error } from 'error-deets';
throw new Error(`a unique error message`, {
details: {
some: 'object with details'
},
code: 'StringOrNumOrTypeScriptEnum'
});
Catching and logging an error
try {
someFunThatThrow();
} catch (err) {
log.error(err.message, err.details);
}
This project is released with a Contributor Code of Conduct. By participating, you agree to abide by its terms.
Bugs, PRs, comments, suggestions welcomed!
FAQs
JavaScript/TypeScript errors with optional details and a code
We found that error-deets 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.