Merge branch 'main' into iiif-mirador

This commit is contained in:
Michael Spalti
2021-04-16 08:47:01 -07:00
228 changed files with 5533 additions and 5672 deletions

View File

@@ -166,6 +166,11 @@ function ngApp(req, res) {
}, (err, data) => {
if (hasNoValue(err) && hasValue(data)) {
res.send(data);
} else if (hasValue(err) && err.code === 'ERR_HTTP_HEADERS_SENT') {
// When this error occurs we can't fall back to CSR because the response has already been
// sent. These errors occur for various reasons in universal, not all of which are in our
// control to solve.
console.warn('Warning [ERR_HTTP_HEADERS_SENT]: Tried to set headers after they were sent to the client');
} else {
console.warn('Error in SSR, serving for direct CSR.');
if (hasValue(err)) {