diff --git a/web/core/components/issues/issue-detail/label/root.tsx b/web/core/components/issues/issue-detail/label/root.tsx index 277bc8849..afff6c0f6 100644 --- a/web/core/components/issues/issue-detail/label/root.tsx +++ b/web/core/components/issues/issue-detail/label/root.tsx @@ -62,10 +62,14 @@ export const IssueLabel: FC = observer((props) => { }); return labelResponse; } catch (error) { + let errMessage = "Label creation failed"; + if (error && (error as any).error === "Label with the same name already exists in the project") + errMessage = "Label already exists"; + setToast({ title: "Error!", type: TOAST_TYPE.ERROR, - message: "Label creation failed", + message: errMessage, }); throw error; }