Add error message to log if database cannot be reached
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
4
app.js
4
app.js
@@ -291,9 +291,9 @@ function syncAndListen () {
|
||||
process.exit(1)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
}).catch((dbError) => {
|
||||
if (currentDBTry < maxDBTries) {
|
||||
logger.warn(`Database cannot be reached. Try ${currentDBTry} of ${maxDBTries}.`)
|
||||
logger.warn(`Database cannot be reached. Try ${currentDBTry} of ${maxDBTries}. (${dbError})`)
|
||||
currentDBTry++
|
||||
setTimeout(function () {
|
||||
syncAndListen()
|
||||
|
||||
Reference in New Issue
Block a user