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

http2-wrapper

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http2-wrapper - npm Package Compare versions

Comparing version 2.1.11 to 2.2.0

2

package.json
{
"name": "http2-wrapper",
"version": "2.1.11",
"version": "2.2.0",
"description": "HTTP2 client, just with the familiar `https` API",

@@ -5,0 +5,0 @@ "main": "source",

@@ -427,2 +427,4 @@ 'use strict';

this[kJobs].length = 0;
this.emit('socket', this.socket);

@@ -429,0 +431,0 @@ };

@@ -29,3 +29,3 @@ 'use strict';

if (statusCode !== 200) {
callback(new UnexpectedStatusCodeError(statusCode));
callback(new UnexpectedStatusCodeError(statusCode, ''));
return;

@@ -32,0 +32,0 @@ }

@@ -12,3 +12,3 @@ 'use strict';

request.off('error', reject);
resolve([socket, response.statusCode]);
resolve([socket, response.statusCode, response.statusMessage]);
};

@@ -15,0 +15,0 @@

@@ -28,3 +28,3 @@ 'use strict';

return [stream, statusCode];
return [stream, statusCode, ''];
}

@@ -31,0 +31,0 @@ }

@@ -17,5 +17,5 @@ 'use strict';

const [stream, statusCode] = await this._getProxyStream(authority);
const [stream, statusCode, statusMessage] = await this._getProxyStream(authority);
if (statusCode !== 200) {
throw new UnexpectedStatusCodeError(statusCode);
throw new UnexpectedStatusCodeError(statusCode, statusMessage);
}

@@ -22,0 +22,0 @@

'use strict';
class UnexpectedStatusCodeError extends Error {
constructor(statusCode) {
super(`The proxy server rejected the request with status code ${statusCode}`);
constructor(statusCode, statusMessage = '') {
super(`The proxy server rejected the request with status code ${statusCode} (${statusMessage || 'empty status message'})`);
this.statusCode = statusCode;
this.statusMessage = statusMessage;
}

@@ -8,0 +9,0 @@ }

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