From cc0c469c2d56465f8ad87c22d2a7df067bd48610 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Fri, 4 Feb 2022 11:46:44 +0100 Subject: [PATCH] Add error message to log if database cannot be reached Signed-off-by: Tilman Vatteroth --- app.js | 4 ++-- public/docs/release-notes.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index d3c170f74..86363482f 100644 --- a/app.js +++ b/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() diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 3ad8e92d4..4faf26257 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -7,6 +7,7 @@ ### Enhancements - Libravatar avatars render as ident-icons when no avatar image was uploaded to Libravatar or Gravatar +- Add database connection error message to log output ## 1.9.2 2021-12-03