@octokit/rest
Advanced tools
Comparing version 15.1.8 to 15.1.9
@@ -12,3 +12,3 @@ 'use strict' | ||
module.exports = class HttpError extends Error { | ||
constructor (message, code) { | ||
constructor (message, code, headers) { | ||
super(message) | ||
@@ -23,2 +23,3 @@ // Maintains proper stack trace for where our error was thrown (only available on V8) | ||
this.status = STATUS_CODES[code] | ||
this.headers = headers | ||
} | ||
@@ -25,0 +26,0 @@ |
@@ -56,3 +56,3 @@ 'use strict' | ||
.then(message => { | ||
throw new HttpError(message, response.status) | ||
throw new HttpError(message, response.status, headers) | ||
}) | ||
@@ -84,4 +84,4 @@ } | ||
throw new HttpError(error.message, 500) | ||
throw new HttpError(error.message, 500, headers) | ||
}) | ||
} |
{ | ||
"name": "@octokit/rest", | ||
"version": "15.1.8", | ||
"version": "15.1.9", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
563354
14716