Fix error not logged
This commit is contained in:
parent
adfe422cc1
commit
ef7b929a72
|
@ -134,7 +134,7 @@ app.use(function (err, req, res, next) {
|
||||||
error = err.stack || err.message || err
|
error = err.stack || err.message || err
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.error({ error }, 'Error in controller.')
|
logger.error({ err: error }, 'Error in controller.')
|
||||||
return res.status(err.status || 500).end()
|
return res.status(err.status || 500).end()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -148,10 +148,10 @@ app.listen(CONFIG.LISTEN.PORT, async () => {
|
||||||
try {
|
try {
|
||||||
await IndexationScheduler.Instance.initIndexes()
|
await IndexationScheduler.Instance.initIndexes()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.error('Cannot init videos index.', { err })
|
logger.error(err, 'Cannot init videos index.')
|
||||||
process.exit(-1)
|
process.exit(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexationScheduler.Instance.execute()
|
IndexationScheduler.Instance.execute()
|
||||||
.catch(err => logger.error('Cannot run video indexer', { err }))
|
.catch(err => logger.error(err, 'Cannot run video indexer'))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue