15856: Merge branch 'master' into 15856-illegal-chars-warning
[arvados-workbench2.git] / src / store / collections / collection-create-actions.ts
index c7dc2ae8ff7bb316410401c4d1662ad0c5ecc405..e077b2a5b33c47b717630baf51c2f83b7bb600a7 100644 (file)
@@ -53,7 +53,7 @@ export const createCollection = (data: CollectionCreateFormDialogData) =>
             return newCollection;
         } catch (e) {
             const error = getCommonResourceServiceError(e);
-            if (error === CommonResourceServiceError.UNIQUE_VIOLATION) {
+            if (error === CommonResourceServiceError.UNIQUE_NAME_VIOLATION) {
                 dispatch(stopSubmit(COLLECTION_CREATE_FORM_NAME, { name: 'Collection with the same name already exists.' } as FormErrors));
             } else if (error === CommonResourceServiceError.NONE) {
                 dispatch(stopSubmit(COLLECTION_CREATE_FORM_NAME));