Print out error if ssr build fails

This commit is contained in:
Alec LaLonde
2021-06-24 14:38:13 -06:00
committed by dan13ram
parent e39f74a3cc
commit 0241e79717

View File

@@ -14,8 +14,12 @@ type Props = InferGetStaticPropsType<typeof getStaticProps>;
export const getStaticProps = async () => {
const [ssrClient, ssrCache] = getSsrClient();
// This populate the cache server-side
await getPlayers(undefined, ssrClient);
// This populates the cache server-side
const { error } = await getPlayers(undefined, ssrClient);
if (error != null) {
// eslint-disable-next-line no-console
console.error('error', error);
}
await getPlayerFilters(ssrClient);
return {