1
0
Fork 0
mirror of synced 2024-10-02 10:16:27 +13:00

Updated ENV_VARIABLE_INCORRECT_SETUP to DOMAIN_VARIABLE_INCORRECT

This commit is contained in:
Bhaskar Singh 2023-03-05 14:35:47 +05:30
parent eaf31fdb78
commit 7f3000439a
3 changed files with 7 additions and 2 deletions

View file

@ -539,6 +539,11 @@ return [
'description' => 'A Domain with the requested ID already exists.',
'code' => 409,
],
Exception::DOMAIN_VERIFICATION_FAILED => [
'name' => Exception::DOMAIN_VARIABLE_INCORRECT,
'description' => 'Your Appwrite instance is not publicly accessible. Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.',
'code' => 501,
],
Exception::VARIABLE_NOT_FOUND => [
'name' => Exception::VARIABLE_NOT_FOUND,
'description' => 'Variable with the requested ID could not be found.',

View file

@ -1340,7 +1340,7 @@ App::post('/v1/projects/:projectId/domains')
$target = new Domain(App::getEnv('_APP_DOMAIN_TARGET', ''));
if (!$target->isKnown() || $target->isTest()) {
throw new Exception(Exception::ENV_VARIABLE_INCORRECT_SETUP, 'Unreachable CNAME target (' . $target->get() . '), please use a domain with a public suffix.');
throw new Exception(Exception::DOMAIN_VERIFICATION_FAILED, 'Unreachable CNAME target (' . $target->get() . '), please use a domain with a public suffix. Please check the _APP_DOMAIN_TARGET environment variable of your Appwrite server.');
}
$domain = new Domain($domain);

View file

@ -177,7 +177,7 @@ class Exception extends \Exception
public const DOMAIN_NOT_FOUND = 'domain_not_found';
public const DOMAIN_ALREADY_EXISTS = 'domain_already_exists';
public const DOMAIN_VERIFICATION_FAILED = 'domain_verification_failed';
public const ENV_VARIABLE_INCORRECT_SETUP = 'env_variable_setup_incorrectly';
public const DOMAIN_VARIABLE_INCORRECT = 'domain_variable_incorrect';
/** GraphqQL */
public const GRAPHQL_NO_QUERY = 'graphql_no_query';