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

@qrvey/fetch

Package Overview
Dependencies
Maintainers
11
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qrvey/fetch - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

12

dist/cjs/index.js

@@ -52,5 +52,6 @@ 'use strict';

var RestClientError = class extends Error {
constructor(url, message) {
super(`REST Client Error at ${url}: ${message}`);
constructor(url, restError) {
super(`REST Client Error at ${url}`);
this.name = "RestClientError";
this.details = restError;
}

@@ -141,6 +142,7 @@ };

static async handleResponse(response) {
const isJsonResponse = response.headers.get("content-type") === "application/json";
const responseData = await (isJsonResponse ? response.json() : response.text());
if (response.ok)
return response.json();
const responseText = await response.text();
throw new RestClientError(response.url, responseText);
return responseData;
throw new RestClientError(response.url, responseData);
}

@@ -147,0 +149,0 @@ static fetchData(url, requestOptions) {

@@ -5,3 +5,3 @@ {

"main": "dist/cjs/index.js",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",

@@ -8,0 +8,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

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