@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-shared",
3
- "version": "2.136.0",
3
+ "version": "2.137.1",
4
4
  "description": "ProteinPaint code that is shared between server and client-side workspaces",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -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)