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

@octokit/request

Package Overview
Dependencies
Maintainers
3
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/request - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

3

lib/http-error.js
module.exports = class HttpError extends Error {
constructor (message, statusCode, headers) {
constructor (message, statusCode, headers, request) {
super(message)

@@ -20,3 +20,4 @@

this.headers = headers
this.request = request
}
}

@@ -43,3 +43,3 @@ 'use strict'

throw new HttpError(response.statusText, status, headers)
throw new HttpError(response.statusText, status, headers, requestOptions)
}

@@ -49,3 +49,3 @@

requestOptions.url = response.headers.location
throw new HttpError('Not modified', status, headers)
throw new HttpError('Not modified', status, headers, requestOptions)
}

@@ -57,3 +57,3 @@

.then(message => {
const error = new HttpError(message, status, headers)
const error = new HttpError(message, status, headers, requestOptions)

@@ -95,4 +95,4 @@ try {

throw new HttpError(error.message, 500, headers)
throw new HttpError(error.message, 500, headers, requestOptions)
})
}
{
"name": "@octokit/request",
"version": "2.1.2",
"version": "2.2.0",
"publishConfig": {

@@ -52,3 +52,2 @@ "access": "public"

"mocha": "^5.2.0",
"nock": "^10.0.1",
"npm-run-all": "^4.1.3",

@@ -58,3 +57,2 @@ "nyc": "^13.1.0",

"simple-mock": "^0.8.0",
"sinon-chai": "^3.2.0",
"standard": "^12.0.1",

@@ -61,0 +59,0 @@ "webpack": "^4.22.0",

@@ -254,2 +254,8 @@ # request.js

If an error occurs, the `error` instance has additional properties to help with debugging
- `error.status` The http response status code
- `error.headers` The http response headers as an object
- `error.request` The request options such as `method`, `url` and `data`
## `octokitRequest.defaults()`

@@ -256,0 +262,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