
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
express-response-errors
Advanced tools
Collection of custom response errors and middleware for express
Collection of custom response errors and middleware for Express.
npm i express-response-errors -S
Add middleware to your application bootstrap file:
const { responseErrorHandler } = require('express-response-errors');
app.use(responseErrorHandler);
Pass HttpError exception with required code and optional message to Express from route handler.
const { HttpError } = require('express-response-errors');
// Ex. with default status text
next(new HttpError(418));
// Ex. with custom message
next(new HttpError(418, 'I only brew tea'));
Pass a specific http exception with optional message to Express from route handler.
const { ImATeapotError } = require('express-response-errors');
// Ex. with default status text
next(new ImATeapotError());
// Ex. with custom status text
next(new ImATeapotError('I only brew tea'));
Errors passed to Express without a message defaults to HTTP standard status text.
Errors are handled by middleware which sends related error message and status as a HTTP response.
FAQs
Collection of custom response errors and middleware for express
The npm package express-response-errors receives a total of 903 weekly downloads. As such, express-response-errors popularity was classified as not popular.
We found that express-response-errors 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 RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.