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 <hello@leog.me>pull/10113/head^2
parent
9f33d85903
commit
008016902e
|
@ -1494,6 +1494,7 @@
|
|||
"must_enter_team_name": "Must enter a team name",
|
||||
"team_url_required": "Must enter a team URL",
|
||||
"url_taken": "This URL is already taken",
|
||||
"problem_registering_domain": "There was a problem with registering the subdomain, please try again or contact an administrator",
|
||||
"team_publish": "Publish team",
|
||||
"number_text_notifications": "Phone number (Text notifications)",
|
||||
"attendee_email_variable": "Attendee email",
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue