Updated the error message for target check fails
in custom domain creation
This commit is contained in:
parent
b16c789282
commit
31a903d144
2 changed files with 6 additions and 6 deletions
|
@ -534,11 +534,6 @@ return [
|
||||||
'description' => 'A Domain with the requested ID already exists.',
|
'description' => 'A Domain with the requested ID already exists.',
|
||||||
'code' => 409,
|
'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 => [
|
Exception::VARIABLE_NOT_FOUND => [
|
||||||
'name' => Exception::VARIABLE_NOT_FOUND,
|
'name' => Exception::VARIABLE_NOT_FOUND,
|
||||||
'description' => 'Variable with the requested ID could not be found.',
|
'description' => 'Variable with the requested ID could not be found.',
|
||||||
|
@ -554,6 +549,11 @@ 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 => [
|
||||||
|
'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::GRAPHQL_NO_QUERY => [
|
Exception::GRAPHQL_NO_QUERY => [
|
||||||
'name' => Exception::GRAPHQL_NO_QUERY,
|
'name' => Exception::GRAPHQL_NO_QUERY,
|
||||||
'description' => 'Param "query" is not optional.',
|
'description' => 'Param "query" is not optional.',
|
||||||
|
|
|
@ -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_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.');
|
throw new Exception(Exception::DOMAIN_VARIABLE_INCORRECT, '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);
|
||||||
|
|
Loading…
Reference in a new issue