
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 handler for express, connect like node framework and core node.js http server application
© Pradeep Mishra, Licensed under the MIT-LICENSE
As a middleware for express, connect like node framework
var app = express();
var errHandler = require("errhandler");
// optional
errHandler.error(function(err, req, res){
// this.error, this.request, this.response is equal to err, req, res in arguments
this.response.send(200, "oops!" + err.stack);
});
app.use(errHandler.middleWare);
app.get('/', function(req,res){
process.nextTick(function(){
throw new Error("my bad");
});
});
app.listen(3000);
As a handler for core node.js http server
var http = require('http');
var errHandler = require("errhandler");
http.createServer(function(req, res) {
var handler = errHandler.handler(req, res);
// optional
handler.error(function(err, req, res){
res.statusCode = 500;
res.setHeader('content-type', 'text/html');
res.end(err.stack);
});
handler.run(function(){
throw new Error('my error');
});
}).listen(3000);
npm install errhandler --save
FAQs
Error handler for express, connect like node framework and core node.js http server application
We found that errhandler 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.