diff --git a/imap.js b/imap.js index b19c15b9..4e12b89e 100644 --- a/imap.js +++ b/imap.js @@ -2140,7 +2140,17 @@ module.exports = done => { }; let indexpos = 0; - let ensureIndexes = () => { + let ensureIndexes = err => { + if (err) { + server.logger.error( + { + tnx: 'mongo', + err + }, + 'Failed creating index', + err.message + ); + } if (indexpos >= setupIndexes.length) { server.logger.info( {