From 4563faedcb6369c6d5da4bdd886e6e78cf40482a Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 12:05:46 +0545 Subject: [PATCH 1/2] fix warning --- 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 0885c0c40b..2809ad8ee4 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -6,7 +6,6 @@ use Utopia\Storage\Device\Local; use Utopia\Storage\Storage; use Appwrite\ClamAV\Network; use Appwrite\Event\Event; -use RuntimeException; App::get('/v1/health') ->desc('Get HTTP') @@ -268,7 +267,7 @@ App::get('/v1/health/anti-virus') 'status' => (@$antiVirus->ping()) ? 'online' : 'offline', 'version' => @$antiVirus->version(), ]); - } catch( RuntimeException $e) { + } catch( \RuntimeException $e) { $response->json([ 'status' => 'offline', 'version' => '', From f26b8f05f52095509ad50c401b8c166429aaf88d Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 10 Jun 2021 14:11:16 +0545 Subject: [PATCH 2/2] use exception instead --- app/controllers/api/health.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 2809ad8ee4..dbbd59f8c3 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -267,7 +267,7 @@ App::get('/v1/health/anti-virus') 'status' => (@$antiVirus->ping()) ? 'online' : 'offline', 'version' => @$antiVirus->version(), ]); - } catch( \RuntimeException $e) { + } catch( \Exception $e) { $response->json([ 'status' => 'offline', 'version' => '',