Permalink
Browse files

🐛 @phenomic/core: correctly throw fetch error during static build

  • Loading branch information...
MoOx committed Mar 6, 2018
1 parent d0572d3 commit 141a6cbb0fa51426685e3f5ca8e4274a87f35b64
Showing with 7 additions and 1 deletion.
  1. +7 −1 packages/core/src/prerender/resolve.js
@@ -111,7 +111,13 @@ const resolveURLsForDynamicParams = async function(
key = mainKey;
}
const queryParams = query(unlimitedQueryConfig);
const queryResult = await phenomicFetch(queryParams);
let queryResult;
try {
queryResult = await phenomicFetch(queryParams);
} catch (e) {
// log simple-json-fetch error if any
throw e.error || e;
}
debug(
route.path,
`path fetched. ${queryResult.list.length} items (id: ${key})`

0 comments on commit 141a6cb

Please sign in to comment.