🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

http-errors

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-errors - npm Package Compare versions

Comparing version

to
1.2.8

HISTORY.md

14

index.js

@@ -5,3 +5,3 @@

exports = module.exports = function () {
exports = module.exports = function httpError() {
// so much arity going on ~_~

@@ -33,3 +33,9 @@ var err;

if (typeof status !== 'number' || !statuses[status]) status = 500;
err = err || new Error(msg || statuses[status]);
if (!err) {
// create error
err = new Error(msg || statuses[status])
Error.captureStackTrace(err, httpError)
}
err.expose = status < 500;

@@ -50,3 +56,3 @@ for (var key in props) err[key] = props[key];

var self = new Error(msg != null ? msg : statuses[code])
Error.captureStackTrace(self, arguments.callee)
Error.captureStackTrace(self, ServerError)
self.__proto__ = ServerError.prototype

@@ -66,3 +72,3 @@ return self

var self = new Error(msg != null ? msg : statuses[code])
Error.captureStackTrace(self, arguments.callee)
Error.captureStackTrace(self, ClientError)
self.__proto__ = ClientError.prototype

@@ -69,0 +75,0 @@ return self

{
"name": "http-errors",
"description": "Create HTTP error objects",
"version": "1.2.7",
"version": "1.2.8",
"author": {

@@ -35,4 +35,6 @@ "name": "Jonathan Ong",

"index.js",
"LICENSE"
"HISTORY.md",
"LICENSE",
"README.md"
]
}