Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
http-verror
Advanced tools
A simple tool that provides `verror` functionality extended by usable HTTP error codes for Express.js
npm install http-verror --save
http-verror instance inherits all properties of WError. In other words, http-verror is a WError but with statusCode
property being equal to the HTTP status code of the error you created.
var errors = require('http-verror');
var err = new errors.Forbidden();
console.log(err.statusCode); // 403
console.log(err.message); // You're not allowed to perform such action
var err2 = new errors.InternalError(new Error('Some preceding error with internal data'), 'Brief error desc');
console.log(err2.statusCode); // 500
console.log(err2.message); // Brief error desc
console.log(err2.cause().message); // Some preceding error with internal data
console.log(err2.toString()); // HttpError: Brief error desc; caused by Error: Some preceding error with internal data
Status code | Name |
---|---|
400 | BadRequest |
401 | Unauthorized |
402 | PaymentRequired |
403 | Forbidden |
404 | NotFound |
405 | MethodNotAllowed |
406 | NotAcceptable |
408 | RequestTimeout |
409 | Conflict |
412 | PreconditionFailed |
415 | UnsupportedMediaType |
500 | InternalError |
501 | NotImplemented |
502 | BadGateway |
503 | ServiceUnavailable |
504 | GatewayTimeout |
FAQs
A simple tool that provides `verror` functionality extended by usable HTTP error codes for Express.js
We found that http-verror 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.