mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-15 11:57:00 +00:00
prevent duplicate label names
This commit is contained in:
@@ -58,12 +58,20 @@ export function EditOrgLabelDialog({
|
||||
description: t("labelEditSuccessMessage")
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
toast({
|
||||
title: t("error"),
|
||||
description: formatAxiosError(e, t("errorOccurred")),
|
||||
variant: "destructive"
|
||||
});
|
||||
} catch (e: any) {
|
||||
if (e.response?.status === 409) {
|
||||
toast({
|
||||
title: t("labelDuplicateError"),
|
||||
description: t("labelDuplicateErrorDescription"),
|
||||
variant: "destructive"
|
||||
});
|
||||
} else {
|
||||
toast({
|
||||
title: t("error"),
|
||||
description: formatAxiosError(e, t("errorOccurred")),
|
||||
variant: "destructive"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user