Slack messaging #169
4 changed files with 8 additions and 10 deletions
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
});
|
||||
})
|
||||
.catch(error => {
|
||||
logger.error('Sequelize error', error);
|
||||
logger.error('Sequelize error >>', error);
|
||||
});
|
||||
},
|
||||
sendGoogleAnalytics (action, headers, ip, originalUrl) {
|
||||
|
@ -137,7 +137,7 @@ module.exports = {
|
|||
resolve({ records: resultHashTable, totals: { totalServe, totalPublish, totalShow, totalCount, totalSuccess, totalFailure }, percentSuccess });
|
||||
})
|
||||
.catch(error => {
|
||||
logger.error('sequelize error', error);
|
||||
logger.error('sequelize error >>', error);
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
|
@ -161,7 +161,7 @@ module.exports = {
|
|||
resolve(results);
|
||||
})
|
||||
.catch(error => {
|
||||
logger.error('sequelize error', error);
|
||||
logger.error('sequelize error >>', error);
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ const { postToStats } = require('../controllers/statsController.js');
|
|||
|
||||
module.exports = {
|
||||
handleRequestError (action, originalUrl, ip, error, res) {
|
||||
logger.error('Request Error >>', error);
|
||||
logger.error(`Request Error >> ${error.message}`, error);
|
||||
if (error.response) {
|
||||
for errors created by node (e.g. for errors created by node (e.g. `new Error('error message')`) the stack and message are non-enumerable
|
||||
postToStats(action, originalUrl, ip, null, null, error.response.data.error.messsage);
|
||||
res.status(error.response.status).send(error.response.data.error.message);
|
||||
|
@ -19,14 +19,12 @@ module.exports = {
|
|||
}
|
||||
},
|
||||
handlePublishError (error) {
|
||||
logger.error(`Publish Error >> ${error.message}`, error);
|
||||
if (error.code === 'ECONNREFUSED') {
|
||||
logger.error('Publish Error:', 'Connection refused. The daemon may not be running.');
|
||||
return 'Connection refused. The daemon may not be running.';
|
||||
} else if (error.response.data.error) {
|
||||
logger.error('Publish Error:', error.response.data.error);
|
||||
return error.response.data.error.message;
|
||||
} else {
|
||||
logger.error('Unhandled Publish Error:', error.message);
|
||||
return error;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -114,7 +114,7 @@ module.exports = {
|
|||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.error('Unable to retrieve daemon download directory. Restart spee.ch once the daemon is ready. Using default "/home/lbry/Downloads".', error);
|
||||
logger.error('Unable to retrieve daemon download directory', error);
|
||||
resolve('/home/lbry/Downloads/');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -135,7 +135,7 @@ app.set('view engine', 'handlebars');
|
|||
db.sequelize
|
||||
.sync() // sync sequelize
|
||||
.then(() => { // get the download directory from the daemon
|
||||
logger.info('Retrieving daemon download directory');
|
||||
logger.info('Retrieving daemon download directory...');
|
||||
return getDownloadDirectory();
|
||||
})
|
||||
.then(hostedContentPath => {
|
||||
|
@ -155,5 +155,5 @@ db.sequelize
|
|||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
logger.error('Startup Error', error);
|
||||
logger.error(`Startup Error >> ${error.message}`, error);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue
When is there a non-enumerable property being passed that this is required?