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 5.1.0 to 5.2.0

6

dist-node/index.js

@@ -72,3 +72,7 @@ 'use strict';

try {
Object.assign(error, JSON.parse(error.message));
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors; // Assumption `errors` would always be in Array Fotmat
error.message = error.message + ": " + errors.map(JSON.stringify).join(", ");
} catch (e) {// ignore, see octokit/rest.js#684

@@ -75,0 +79,0 @@ }

@@ -54,3 +54,8 @@ import isPlainObject from "is-plain-object";

try {
Object.assign(error, JSON.parse(error.message));
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors;
// Assumption `errors` would always be in Array Fotmat
error.message =
error.message + ": " + errors.map(JSON.stringify).join(", ");
}

@@ -57,0 +62,0 @@ catch (e) {

@@ -62,3 +62,8 @@ import { endpoint } from '@octokit/endpoint';

try {
Object.assign(error, JSON.parse(error.message));
let responseBody = JSON.parse(error.message);
Object.assign(error, responseBody);
let errors = responseBody.errors;
// Assumption `errors` would always be in Array Fotmat
error.message =
error.message + ": " + errors.map(JSON.stringify).join(", ");
}

@@ -65,0 +70,0 @@ catch (e) {

4

package.json
{
"name": "@octokit/request",
"description": "Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node",
"version": "5.1.0",
"version": "5.2.0",
"license": "MIT",

@@ -49,3 +49,3 @@ "files": [

"jest": "^24.7.1",
"lolex": "^4.2.0",
"lolex": "^5.0.0",
"prettier": "^1.17.0",

@@ -52,0 +52,0 @@ "semantic-release": "^15.10.5",

@@ -26,2 +26,3 @@ # request.js

- [Alternative: pass `method` & `url` as part of options](#alternative-pass-method--url-as-part-of-options)
- [Authentication](#authentication)
- [request()](#request)

@@ -28,0 +29,0 @@ - [`request.defaults()`](#requestdefaults)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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