
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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
The npm package http-verror receives a total of 0 weekly downloads. As such, http-verror popularity was classified as not popular.
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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
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.