fix: incomplete vercel api error message on org creation (#9875)

* fix incomplete vercel api error message on org creation

* remove specified type from vercelCreateDomain

* have common error message for org domain registration

---------

Co-authored-by: Leo Giovanetti <[email protected]>
This commit is contained in:
Ritik KumarandLeo Giovanetti authored and GitHub committed 2023-07-12 20:29:13 +00:00
1 parent 9f33d85903
commit 008016902e
2 files changed
+6

No files matched your search

@@ -178,6 +178,11 @@ export const CreateANewOrganizationForm = () => {
});
} else if (err.message === "organization_url_taken") {
newOrganizationFormMethods.setError("slug", { type: "custom", message: t("url_taken") });
} else if (err.message === "domain_taken_team" || err.message === "domain_taken_project") {
newOrganizationFormMethods.setError("slug", {
type: "custom",
message: t("problem_registering_domain"),
});
} else {
setServerErrorMessage(err.message);
}