Finetune error logging

This commit is contained in:
Kristian Polso 2018-05-30 12:59:17 +03:00
parent 54484e5b0c
commit 9272482d6d

View file

@ -61,7 +61,7 @@ app.get('/forward', function(req, res) {
}, function(error, response, body) {
// Should we parse the body before forwarding?
if(typeof body.error != "") {
logger.error('Got error from daemon', body);
logger.error('Got error from daemon', {error: body.error});
}
res.setHeader('Content-Type', 'application/json');
res.send(body);
@ -129,9 +129,9 @@ function updateGithubFeed() {
});
}).catch(function({data}) {
}).catch(function(err) {
logger.error('Couldn\t update Github feed', data);
logger.error('Couldn\t update Github feed', {error: error});
});