@vitrical/utils
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -136,6 +136,7 @@ "use strict"; | ||
let body = null; | ||
try { | ||
const contentType = res.headers.get('content-type'); | ||
if (contentType?.includes('application/json')) { | ||
body = await res.json(); | ||
} | ||
catch (err) { | ||
else { | ||
body = await res.text(); | ||
@@ -161,3 +162,4 @@ } | ||
.catch((err) => { | ||
reject(err); | ||
const apiError = (0, exports.handleApiError)(url, newStack || '', err); | ||
reject(apiError); | ||
}); | ||
@@ -164,0 +166,0 @@ return; |
{ | ||
"name": "@vitrical/utils", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"description": "Collection of useful functions and typings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48397
731