mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #8879 from appwrite/fix-check-domain-availability
Throw exception for error
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user