From debf882d021824103fc5fa38caa4f99859dc5f32 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 9 Feb 2022 02:47:48 +0400 Subject: [PATCH] feat: address review comments --- app/config/errors.php | 8 ++++---- app/controllers/api/projects.php | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/config/errors.php b/app/config/errors.php index 700273e96a..0ec2c08b55 100644 --- a/app/config/errors.php +++ b/app/config/errors.php @@ -25,7 +25,7 @@ return [ ], Exception::GENERAL_SERVICE_DISABLED => [ 'name' => Exception::GENERAL_SERVICE_DISABLED, - 'description' => 'The requested service is disabled. You can enable/disable a service from the Appwrite console or by contacting the project owner.', + 'description' => 'The requested service is disabled. You can enable/disable a service from the Appwrite console or by contacting the project administrator.', 'code' => 503, ], Exception::GENERAL_UNAUTHORIZED_SCOPE => [ @@ -40,7 +40,7 @@ return [ ], Exception::GENERAL_SMTP_DISABLED => [ 'name' => Exception::GENERAL_SMTP_DISABLED, - 'description' => 'SMTP is disabled on your Appwrite instance. Please contact the project owner.', + 'description' => 'SMTP is disabled on your Appwrite instance. Please contact the project administrator.', 'code' => 503, ], Exception::GENERAL_ARGUMENT_INVALID => [ @@ -82,7 +82,7 @@ return [ ], Exception::USER_BLOCKED => [ 'name' => Exception::USER_BLOCKED, - 'description' => 'The current user has been blocked. Please contact the project owner for more information.', + 'description' => 'The current user has been blocked. Please contact the project administrator for more information.', 'code' => 401, ], Exception::USER_INVALID_TOKEN => [ @@ -355,7 +355,7 @@ return [ /** Indexes */ Exception::INDEX_NOT_FOUND => [ 'name' => Exception::INDEX_NOT_FOUND, - 'description' => 'Index with the requested could not be found.', + 'description' => 'Index with the requested ID could not be found.', 'code' => 404, ], Exception::INDEX_LIMIT_EXCEEDED => [ diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 0b2da9beb8..0157667c88 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1377,7 +1377,6 @@ App::patch('/v1/projects/:projectId/domains/:domainId/verification') $validator = new CNAME($target->get()); // Verify Domain with DNS records if (!$validator->isValid($domain->getAttribute('domain', ''))) { - // TODO: Isn't 401 Unauthorized ? Should we return a 400 Bad Request ? throw new Exception('Failed to verify domain', 401, Exception::DOMAIN_VERIFICATION_FAILED); }