Updating the exception variable name for easy
readability
This commit is contained in:
parent
31a903d144
commit
8b5e0e1f1a
3 changed files with 4 additions and 4 deletions
|
@ -549,8 +549,8 @@ return [
|
||||||
'description' => 'Domain verification for the requested domain has failed.',
|
'description' => 'Domain verification for the requested domain has failed.',
|
||||||
'code' => 401,
|
'code' => 401,
|
||||||
],
|
],
|
||||||
Exception::DOMAIN_VARIABLE_INCORRECT => [
|
Exception::DOMAIN_TARGET_INVALID => [
|
||||||
'name' => Exception::DOMAIN_VARIABLE_INCORRECT,
|
'name' => Exception::DOMAIN_TARGET_INVALID,
|
||||||
'description' => 'Your Appwrite instance is not publicly accessible. Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.',
|
'description' => 'Your Appwrite instance is not publicly accessible. Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.',
|
||||||
'code' => 501,
|
'code' => 501,
|
||||||
],
|
],
|
||||||
|
|
|
@ -1340,7 +1340,7 @@ App::post('/v1/projects/:projectId/domains')
|
||||||
$target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', ''));
|
$target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', ''));
|
||||||
|
|
||||||
if (!$target->isKnown() || $target->isTest()) {
|
if (!$target->isKnown() || $target->isTest()) {
|
||||||
throw new Exception(Exception::DOMAIN_VARIABLE_INCORRECT, 'Unreachable CNAME target (' . $target->get() . '). Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.');
|
throw new Exception(Exception::DOMAIN_TARGET_INVALID, 'Unreachable CNAME target (' . $target->get() . '). Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain = new Domain($domain);
|
$domain = new Domain($domain);
|
||||||
|
|
|
@ -177,7 +177,7 @@ class Exception extends \Exception
|
||||||
public const DOMAIN_NOT_FOUND = 'domain_not_found';
|
public const DOMAIN_NOT_FOUND = 'domain_not_found';
|
||||||
public const DOMAIN_ALREADY_EXISTS = 'domain_already_exists';
|
public const DOMAIN_ALREADY_EXISTS = 'domain_already_exists';
|
||||||
public const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed';
|
public const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed';
|
||||||
public const DOMAIN_VARIABLE_INCORRECT = 'domain_variable_incorrect';
|
public const DOMAIN_TARGET_INVALID = 'domain_target_invalid';
|
||||||
|
|
||||||
/** GraphqQL */
|
/** GraphqQL */
|
||||||
public const GRAPHQL_NO_QUERY = 'graphql_no_query';
|
public const GRAPHQL_NO_QUERY = 'graphql_no_query';
|
||||||
|
|
Loading…
Reference in a new issue