mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #8879 from appwrite/fix-check-domain-availability
Throw exception for error
This commit is contained in:
commit
b7f519f86e
1 changed files with 2 additions and 8 deletions
|
|
@ -397,14 +397,8 @@ App::get('/v1/proxy/subdomains')
|
|||
]);
|
||||
|
||||
if ($document && !$document->isEmpty()) {
|
||||
return $response->json([
|
||||
'success' => false,
|
||||
'message' => 'Subdomain is already taken.'
|
||||
], Response::STATUS_CODE_CONFLICT);
|
||||
throw new Exception(Exception::RULE_ALREADY_EXISTS, 'Subdomain already assigned to different project.');
|
||||
}
|
||||
|
||||
return $response->json([
|
||||
'success' => true,
|
||||
'message' => 'Subdomain is available.'
|
||||
], Response::STATUS_CODE_OK);
|
||||
$response->noContent();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue