15856: Merge branch 'master' into 15856-illegal-chars-warning
[arvados-workbench2.git] / src / store / projects / project-move-actions.ts
index d8eebb8194c05576a33e6eac6f37c4b6e7fed8e0..4dcaf2f514c914a17c6525fb88f2abb9fc9f1cd3 100644 (file)
@@ -38,7 +38,7 @@ export const moveProject = (resource: MoveToFormDialogData) =>
             return newProject;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
-            if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+            if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                 dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'A project with the same name already exists in the target project.' } as FormErrors));
             } else if (error === CommonResourceServiceError.OWNERSHIP_CYCLE) {
                 dispatch(stopSubmit(PROJECT_MOVE_FORM_NAME, { ownerUuid: 'Cannot move a project into itself.' } as FormErrors));