mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Added logging for members-ssr errors
no-issue This will help us debug issues with members-ssr functionality going forward
This commit is contained in:
parent
2b6830b747
commit
805f3c7250
@ -4,6 +4,7 @@ const express = require('express');
|
||||
|
||||
// App requires
|
||||
const config = require('../../config');
|
||||
const common = require('../../lib/common');
|
||||
const apps = require('../../services/apps');
|
||||
const constants = require('../../lib/constants');
|
||||
const storage = require('../../adapters/storage');
|
||||
@ -97,6 +98,7 @@ module.exports = function setupSiteApp(options = {}) {
|
||||
res.writeHead(200);
|
||||
res.end();
|
||||
}).catch((err) => {
|
||||
common.logging.error(err);
|
||||
res.writeHead(err.statusCode);
|
||||
res.end(err.message);
|
||||
});
|
||||
@ -106,6 +108,7 @@ module.exports = function setupSiteApp(options = {}) {
|
||||
res.writeHead(204);
|
||||
res.end();
|
||||
}).catch((err) => {
|
||||
common.logging.error(err);
|
||||
res.writeHead(err.statusCode);
|
||||
res.end(err.message);
|
||||
});
|
||||
@ -114,8 +117,8 @@ module.exports = function setupSiteApp(options = {}) {
|
||||
membersService.ssr.getMemberDataFromSession(req, res).then((member) => {
|
||||
req.member = member;
|
||||
next();
|
||||
}).catch(() => {
|
||||
// @TODO log error?
|
||||
}).catch((err) => {
|
||||
common.logging.error(err);
|
||||
req.member = null;
|
||||
next();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user