From adf103730b45bf1e7ab6e38787733187ed99c64d Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Sun, 6 Feb 2022 21:27:13 +0400 Subject: [PATCH] feat: update error codes in the health API --- app/config/errors.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/config/errors.php b/app/config/errors.php index c92e001924..7de4ac21db 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -49,6 +49,36 @@ return [ 'description' => 'SMTP is disabled on your Appwrite instance. Please contact your project ', 'statusCode' => 503, ], + Exception::DATABASE_NOT_AVAILABLE => [ + 'name' => Exception::DATABASE_NOT_AVAILABLE, + 'description' => 'Database is not available. Please contact your project owner.', + 'statusCode' => 503, + ], + Exception::CACHE_NOT_AVAILABLE => [ + 'name' => Exception::CACHE_NOT_AVAILABLE, + 'description' => 'Cache is not available. Please contact your project owner.', + 'statusCode' => 503, + ], + Exception::TIME_GAPS_DETECTED => [ + 'name' => Exception::TIME_GAPS_DETECTED, + 'description' => 'Time gaps detected. Please contact your project owner.', + 'statusCode' => 503, + ], + Exception::STORAGE_NOT_READABLE => [ + 'name' => Exception::STORAGE_NOT_READABLE, + 'description' => 'Storage is not readable. Please contact your project owner.', + 'statusCode' => 503, + ], + Exception::STORAGE_NOT_WRITABLE => [ + 'name' => Exception::STORAGE_NOT_WRITABLE, + 'description' => 'Storage is not writable. Please contact your project owner.', + 'statusCode' => 503, + ], + Exception::ANTIVIRUS_NOT_AVAILABLE => [ + 'name' => Exception::ANTIVIRUS_NOT_AVAILABLE, + 'description' => 'Antivirus is not available. Please contact your project owner.', + 'statusCode' => 503, + ], /** Project Errors */ Exception::PROJECT_NOT_FOUND => [