diff --git a/apps/web/ce/components/projects/create/root.tsx b/apps/web/ce/components/projects/create/root.tsx index 3e4b5b41667..442c10f7f22 100644 --- a/apps/web/ce/components/projects/create/root.tsx +++ b/apps/web/ce/components/projects/create/root.tsx @@ -110,7 +110,7 @@ export const CreateProjectForm = observer(function CreateProjectForm(props: TCre if (setToFavorite) { handleAddToFavorites(res.id); } - handleNextStep(res.id); + return handleNextStep(res.id); }) .catch((err) => { try { @@ -119,8 +119,9 @@ export const CreateProjectForm = observer(function CreateProjectForm(props: TCre const nameError = errorData.name?.includes("PROJECT_NAME_ALREADY_EXIST"); const identifierError = errorData?.identifier?.includes("PROJECT_IDENTIFIER_ALREADY_EXIST"); + const nameSpecialCharError = errorData?.name?.includes("PROJECT_NAME_CANNOT_CONTAIN_SPECIAL_CHARACTERS"); - if (nameError || identifierError) { + if (nameError || identifierError || nameSpecialCharError) { if (nameError) { setToast({ type: TOAST_TYPE.ERROR, @@ -136,6 +137,14 @@ export const CreateProjectForm = observer(function CreateProjectForm(props: TCre message: t("project_identifier_already_taken"), }); } + + if (nameSpecialCharError) { + setToast({ + type: TOAST_TYPE.ERROR, + title: t("toast.error"), + message: t("project_name_cannot_contain_special_characters"), + }); + } } else { setToast({ type: TOAST_TYPE.ERROR,