Socket
Socket
Sign inDemoInstall

@octokit/request-error

Package Overview
Dependencies
3
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 3.0.0

12

package.json
{
"name": "@octokit/request-error",
"description": "Error class for Octokit request errors",
"version": "2.1.0",
"version": "3.0.0",
"license": "MIT",

@@ -30,12 +30,14 @@ "files": [

"@pika/plugin-ts-standard-pkg": "^0.9.0",
"@types/jest": "^26.0.0",
"@types/node": "^14.0.4",
"@types/jest": "^27.0.0",
"@types/node": "^16.0.0",
"@types/once": "^1.4.0",
"jest": "^27.0.0",
"pika-plugin-unpkg-field": "^1.1.0",
"prettier": "2.3.1",
"semantic-release": "^17.0.0",
"prettier": "2.7.1",
"ts-jest": "^27.0.0-next.12",
"typescript": "^4.0.0"
},
"engines": {
"node": ">= 14"
},
"publishConfig": {

@@ -42,0 +44,0 @@ "access": "public"

@@ -41,5 +41,2 @@ # http-error.js

const error = new RequestError("Oops", 500, {
headers: {
"x-github-request-id": "1:2:3:4",
}, // response headers
request: {

@@ -55,2 +52,12 @@ method: "POST",

},
response: {
status: 500,
url: "https://api.github.com/foo"
headers: {
"x-github-request-id": "1:2:3:4",
},
data: {
foo: "bar"
}
},
});

@@ -60,6 +67,3 @@

error.status; // 500
error.request.method; // POST
error.request.url; // https://api.github.com/foo
error.request.body; // { bar: 'baz' }
error.request.headers; // { authorization: 'token [REDACTED]' }
error.request; // { method, url, headers, body }
error.response; // { url, status, headers, data }

@@ -66,0 +70,0 @@ ```

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc