From 853776744365e23fdfb937b090c01aaa6931501d Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 28 May 2019 15:18:27 +0200 Subject: [PATCH] [Web] Show error when connection to redis fails (instead of 5xx) --- data/web/inc/prerequisites.inc.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/web/inc/prerequisites.inc.php b/data/web/inc/prerequisites.inc.php index 7c651803..659b0285 100644 --- a/data/web/inc/prerequisites.inc.php +++ b/data/web/inc/prerequisites.inc.php @@ -41,7 +41,15 @@ $tfa = new RobThree\Auth\TwoFactorAuth($OTP_LABEL, 6, 30, 'sha1', $qrprovider); // Redis $redis = new Redis(); -$redis->connect('redis-mailcow', 6379); +try { + $redis->connect('redis-mailcow', 6379); +} +catch (Exception $e) { +?> +
Connection to Redis failed.

The following error was reported:
getMessage();?>
+