15856: Enhances error constant naming.
[arvados.git] / src / store / projects / project-update-actions.ts
index b92069762a0e300e62044f0f289510fae68911ae..2449b9ce9bf1a049eeb7790cfe1fc84ee2ef6b3b 100644 (file)
@@ -39,7 +39,7 @@ export const updateProject = (project: Partial<ProjectResource>) =>
             return updatedProject;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
-            if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+            if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                 dispatch(stopSubmit(PROJECT_UPDATE_FORM_NAME, { name: 'Project with the same name already exists.' } as FormErrors));
             }
             return ;