15856: Enhances error constant naming.
[arvados-workbench2.git] / src / store / projects / project-move-actions.ts
index 441b8a6c7d3b587b4c7c019da67e87b011038456..a018f3d39de691d985e802b1eb5395eacd7eb3db 100644 (file)
@@ -36,7 +36,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));