1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

feat: address review comments

This commit is contained in:
Christy Jacob 2022-02-09 02:47:48 +04:00
parent d5dd6a17b8
commit debf882d02
2 changed files with 4 additions and 5 deletions

View file

@ -25,7 +25,7 @@ return [
], ],
Exception::GENERAL_SERVICE_DISABLED => [ Exception::GENERAL_SERVICE_DISABLED => [
'name' => 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, 'code' => 503,
], ],
Exception::GENERAL_UNAUTHORIZED_SCOPE => [ Exception::GENERAL_UNAUTHORIZED_SCOPE => [
@ -40,7 +40,7 @@ return [
], ],
Exception::GENERAL_SMTP_DISABLED => [ Exception::GENERAL_SMTP_DISABLED => [
'name' => 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, 'code' => 503,
], ],
Exception::GENERAL_ARGUMENT_INVALID => [ Exception::GENERAL_ARGUMENT_INVALID => [
@ -82,7 +82,7 @@ return [
], ],
Exception::USER_BLOCKED => [ Exception::USER_BLOCKED => [
'name' => 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, 'code' => 401,
], ],
Exception::USER_INVALID_TOKEN => [ Exception::USER_INVALID_TOKEN => [
@ -355,7 +355,7 @@ return [
/** Indexes */ /** Indexes */
Exception::INDEX_NOT_FOUND => [ Exception::INDEX_NOT_FOUND => [
'name' => 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, 'code' => 404,
], ],
Exception::INDEX_LIMIT_EXCEEDED => [ Exception::INDEX_LIMIT_EXCEEDED => [

View file

@ -1377,7 +1377,6 @@ App::patch('/v1/projects/:projectId/domains/:domainId/verification')
$validator = new CNAME($target->get()); // Verify Domain with DNS records $validator = new CNAME($target->get()); // Verify Domain with DNS records
if (!$validator->isValid($domain->getAttribute('domain', ''))) { 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); throw new Exception('Failed to verify domain', 401, Exception::DOMAIN_VERIFICATION_FAILED);
} }