Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

httpexceptions

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httpexceptions - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

4

lib/http-exception.js

@@ -30,2 +30,6 @@ var HTTPException = (function () {

}
HTTPException.prototype.toString = function () {
//console.warn(this.type + ': ' + this.status + ' ' + this.name + ' => ' + this.message)
return this.name + '(' + this.status + '): ' + this.message;
};
return HTTPException;

@@ -32,0 +36,0 @@ })();

@@ -47,4 +47,10 @@ declare class Error {

toString(){
//console.warn(this.type + ': ' + this.status + ' ' + this.name + ' => ' + this.message)
return this.name + '('+this.status+'): ' + this.message;
}
}
export = HTTPException;
export = HTTPException;

3

lib/types/badgateway.js
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};

@@ -7,0 +6,0 @@ var HTTPException = require('../http-exception');

{
"name": "httpexceptions",
"version": "1.0.10",
"version": "1.0.11",
"description": "Provide exception for HTTP Rest API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,2 +24,3 @@ /**

expect(err.status).to.equal(502);
expect(err.toString()).to.equal('BAD_GATEWAY(502): message');
}

@@ -32,7 +33,7 @@

try{
throw new HTTPException.BadRequest('message');
throw new HTTPException.BadRequest('Parameters required [t1,t2]' );
}catch(err){
expect(err instanceof HTTPException.HTTPException).to.be.true;
expect(err.status).to.equal(400);
expect(err.toString()).to.equal('BAD_REQUEST(400): Parameters required [t1,t2]');
}

@@ -50,2 +51,3 @@

expect(err.status).to.equal(403);
expect(err.toString()).to.equal('FORBIDDEN(403): message');
}

@@ -52,0 +54,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc