mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-09 13:51:57 -04:00
Add error message to log if database cannot be reached
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
46f822453d
commit
cc0c469c2d
2 changed files with 3 additions and 2 deletions
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue