@octokit/request
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -1,24 +0,14 @@ | ||
'use strict' | ||
const STATUS_CODES = { | ||
304: 'Not Modified', // See PR #673 (https://github.com/octokit/rest.js/pull/673) | ||
400: 'Bad Request', | ||
404: 'Not Found', | ||
500: 'Internal Server Error', | ||
504: 'Gateway Timeout' | ||
} | ||
module.exports = class HttpError extends Error { | ||
constructor (message, code, headers) { | ||
constructor (message, code) { | ||
super(message) | ||
// Maintains proper stack trace for where our error was thrown (only available on V8) | ||
/* istanbul ignore else */ | ||
// Maintains proper stack trace (only available on V8) | ||
/* istanbul ignore next */ | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, this.constructor) | ||
} | ||
this.name = 'HttpError' | ||
this.code = code | ||
this.status = STATUS_CODES[code] | ||
this.headers = headers | ||
} | ||
} |
{ | ||
"name": "@octokit/request", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2
32751
438