Print error message when error occurred on SSR

This commit is contained in:
Giuseppe Digilio
2019-09-13 17:37:08 +02:00
parent aea83ed662
commit 4cc7432e91

View File

@@ -67,7 +67,7 @@ export function startServer(bootstrap: Type<{}> | NgModuleFactory<{}>) {
function onHandleError(parentZoneDelegate, currentZone, targetZone, error) {
if (!res._headerSent) {
console.warn('Error in SSR, serving for direct CSR');
console.warn('Error in SSR, serving for direct CSR. Error details : ', error);
res.sendFile('index.csr.html', { root: './src' });
}
}