
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
error-status-helper
Advanced tools
Extends node.js response middleware with status codes helper methods.
Extends express response middleware with status codes helper methods.
$ npm install error-status-helper
javascript
var express = require('express');
var errorStatus = require('error-status-helper');
errorStatus(express);
var app = express();
// catch 404 and forward to error handler
app.use(statusHelper.notFoundMiddleware);
// error handler
app.use(statusHelper.errorMiddleware);
Using sendData packaging return values only available in express
register: (req, res, next) => {
const body = req.body;
return new promise((resolve, reject) => {
if (body.user && body.password && body.phone) {
return resolve(body);
}
else {
return reject(errorStatus.Parameter_Error);
}
}).then(data => {
return userInfoModule.register(body);
}).then(data => {
res.sendData(data);
}).catch(err => {
next(err, req, res);
});
}
Using extendStatus extended state information
errorStatus.extendStatus('User_Has_Registered', {code: 202, statusCode: 202001, message: "The user has been registered"});
FAQs
Extends node.js response middleware with status codes helper methods.
We found that error-status-helper 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.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.