fix: unique check

This commit is contained in:
Piyush Gupta
2025-06-24 18:14:54 +05:30
parent 907899c3d6
commit 95838d7cd1

View File

@@ -77,7 +77,11 @@ export const SingleTag: React.FC<SingleTagProps> = ({
toast.success(t("environments.project.tags.tag_updated"));
} else {
const errorMessage = getFormattedErrorMessage(updateTagNameResponse);
if (errorMessage?.includes("Unique constraint failed")) {
if (
errorMessage?.includes(
t("environments.project.tags.unique_constraint_failed_on_the_fields")
)
) {
toast.error(t("environments.project.tags.tag_already_exists"), {
duration: 2000,
icon: <AlertCircleIcon className="h-5 w-5 text-orange-500" />,