From 753824428aaa4f4e2599de756bc74e261273b988 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 3 Jan 2022 10:50:52 +0100 Subject: [PATCH] fix: throw exception when antivirus is not available --- app/controllers/api/health.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 38024bb45e..bcfbbd20ce 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -341,8 +341,7 @@ App::get('/v1/health/anti-virus') $output['version'] = @$antivirus->version(); $output['status'] = (@$antivirus->ping()) ? 'pass' : 'fail'; } catch( \Exception $e) { - $output['status'] = 'offline'; - $output['version'] = ''; + throw new Exception('Antivirus is not available', 500); } }