15856: Enhances error constant naming.
[arvados-workbench2.git] / src / store / collections / collection-copy-actions.ts
index 0ce92dfabcecbdc86a3c4cd087b97d4bcee2fddd..b13d08aaad236eb8eae6962a969fc1aaae79e326 100644 (file)
@@ -38,7 +38,7 @@ export const copyCollection = (resource: CopyFormDialogData) =>
             return newCollection;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
-            if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+            if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                 dispatch(stopSubmit(
                     COLLECTION_COPY_FORM_NAME,
                     { ownerUuid: 'A collection with the same name already exists in the target project.' } as FormErrors