Removed noise from members-ssr error logging

no-issue

Previously we were using the error logger, which is probably a bit
extreme for these errors. This also removes the stacktrace from the logs
so we don't enter fresh hell whilst developing/looking through logs.
This commit is contained in:
Fabien O'Carroll 2019-07-29 15:45:01 +08:00
parent 4428822253
commit 7cc90a3f62

View File

@ -98,7 +98,7 @@ module.exports = function setupSiteApp(options = {}) {
res.writeHead(200);
res.end();
}).catch((err) => {
common.logging.error(err);
common.logging.warn(err.message);
res.writeHead(err.statusCode);
res.end(err.message);
});
@ -108,7 +108,7 @@ module.exports = function setupSiteApp(options = {}) {
res.writeHead(204);
res.end();
}).catch((err) => {
common.logging.error(err);
common.logging.warn(err.message);
res.writeHead(err.statusCode);
res.end(err.message);
});
@ -118,7 +118,7 @@ module.exports = function setupSiteApp(options = {}) {
req.member = member;
next();
}).catch((err) => {
common.logging.error(err);
common.logging.warn(err.message);
req.member = null;
next();
});