15856: Enhances error constant naming.
[arvados-workbench2.git] / src / store / collections / collection-move-actions.ts
index 0351e746b3c8a334d0f950a7cc280f7cec40d96b..6ccd0caaf8dba1afeaa6af58358cfd7a5dddb181 100644 (file)
@@ -38,7 +38,7 @@ export const moveCollection = (resource: MoveToFormDialogData) =>
             return collection;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
-            if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+            if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                 dispatch(stopSubmit(COLLECTION_MOVE_FORM_NAME, { ownerUuid: 'A collection with the same name already exists in the target project.' } as FormErrors));
             } else {
                 dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_MOVE_FORM_NAME }));