@sjcrh/proteinpaint-shared 2.136.0 → 2.137.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/fetch-helpers.js +4 -1
package/package.json
CHANGED
package/src/fetch-helpers.js
CHANGED
|
@@ -159,8 +159,11 @@ export async function memFetch(url, init, opts = {}) {
|
|
|
159
159
|
dataCache.set(
|
|
160
160
|
dataKey,
|
|
161
161
|
fetch(url, init).then(async r => {
|
|
162
|
-
if (!r.ok) throw 'memFetch error ' + r.status
|
|
163
162
|
const response = await processResponse(r)
|
|
163
|
+
if (!r.ok) {
|
|
164
|
+
console.log(response)
|
|
165
|
+
throw 'memFetch error ' + r.status
|
|
166
|
+
}
|
|
164
167
|
// to-do: support opt.freeze to enforce deep freeze of data.json()
|
|
165
168
|
dataCache.set(dataKey, response)
|
|
166
169
|
return dataCache.get(dataKey)
|