@lit-protocol/misc
Advanced tools
Comparing version 6.5.2 to 6.5.3-alpha.0
@@ -20,3 +20,2 @@ { | ||
"@ethersproject/providers": "5.7.2", | ||
"@lit-protocol/accs-schemas": "^0.0.12", | ||
"@lit-protocol/contracts": "^0.0.63", | ||
@@ -30,5 +29,5 @@ "ajv": "^8.12.0", | ||
"util": "0.12.5", | ||
"@lit-protocol/constants": "6.5.2", | ||
"@lit-protocol/logger": "6.5.2", | ||
"@lit-protocol/types": "6.5.2", | ||
"@lit-protocol/constants": "6.5.3-alpha.0", | ||
"@lit-protocol/logger": "6.5.3-alpha.0", | ||
"@lit-protocol/types": "6.5.3-alpha.0", | ||
"tslib": "1.14.1" | ||
@@ -44,4 +43,4 @@ }, | ||
], | ||
"version": "6.5.2", | ||
"version": "6.5.3-alpha.0", | ||
"main": "./src/index.js" | ||
} |
@@ -587,19 +587,8 @@ "use strict"; | ||
?.includes('application/json'); | ||
let data; | ||
try { | ||
data = await response.json(); | ||
} | ||
catch (e) { | ||
(0, exports.logErrorWithRequestId)(requestId, 'error processing response as json, fallback to text', JSON.stringify(e)); | ||
data = await response.text(); | ||
} | ||
const data = isJson ? await response.json() : null; | ||
if (!response.ok) { | ||
// get error message from body or default to response status | ||
const error = data || response.status; | ||
(0, exports.logErrorWithRequestId)(requestId, data); | ||
return Promise.reject(error); | ||
} | ||
else { | ||
(0, exports.logWithRequestId)(requestId, `request succeeded ${url}`, data); | ||
} | ||
return data; | ||
@@ -611,3 +600,2 @@ }) | ||
: ''}`); | ||
(0, exports.logErrorWithRequestId)(requestId, `Error in request to node ${JSON.stringify(error)} with url: ${url}`); | ||
return Promise.reject(error); | ||
@@ -614,0 +602,0 @@ }); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
15
51081
902
1
+ Added@lit-protocol/constants@6.5.3-alpha.0(transitive)
+ Added@lit-protocol/logger@6.5.3-alpha.0(transitive)
+ Added@lit-protocol/types@6.5.3-alpha.0(transitive)
- Removed@lit-protocol/accs-schemas@^0.0.12
- Removed@lit-protocol/accs-schemas@0.0.12(transitive)
- Removed@lit-protocol/constants@6.5.2(transitive)
- Removed@lit-protocol/logger@6.5.2(transitive)
- Removed@lit-protocol/types@6.5.2(transitive)