Commit 7446a750 authored by Vitaly Lipatov's avatar Vitaly Lipatov

web: handle missing Redis extension gracefully

parent 20a4e5bb
...@@ -80,7 +80,7 @@ try { ...@@ -80,7 +80,7 @@ try {
throw new RedisException('unable to enqueue unban command'); throw new RedisException('unable to enqueue unban command');
} }
$redis->close(); $redis->close();
} catch (RedisException $error) { } catch (Throwable $error) {
http_response_code(503); http_response_code(503);
error_log('eterban: web unban request was not delivered: ' . $error->getMessage()); error_log('eterban: web unban request was not delivered: ' . $error->getMessage());
exit('Unban service is temporarily unavailable. Please contact an administrator.'); exit('Unban service is temporarily unavailable. Please contact an administrator.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment