🚀 Socket Launch Week 🚀 Day 1: Introducing .NET Support in Socket.Learn More
Socket
Sign inDemoInstall
Socket

rest-client-sdk

Package Overview
Dependencies
Maintainers
4
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-client-sdk - npm Package Compare versions

Comparing version

to
6.6.2

4

CHANGELOG.md
# Changelog
## 6.6.2
Fix issue with response body already consumed when an error occured while generating token
## 6.6.1

@@ -4,0 +8,0 @@

2

package.json
{
"name": "rest-client-sdk",
"version": "6.6.1",
"version": "6.6.2",
"description": "Rest Client SDK for API",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -181,2 +181,3 @@ /* eslint-disable camelcase */

const response = responseOrBody;
const originalResponse = response.clone();
return response

@@ -190,3 +191,3 @@ .json()

// throw an error if response status code is an "error" status code
throw getHttpErrorFromResponse(response);
throw getHttpErrorFromResponse(originalResponse);
}

@@ -198,3 +199,6 @@

if (!(err instanceof OauthError)) {
throw new OauthError(err.type, getHttpErrorFromResponse(response));
throw new OauthError(
err.type,
getHttpErrorFromResponse(originalResponse)
);
}

@@ -201,0 +205,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet