+ 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));
+ dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_CREATE_FORM_NAME }));
+ dispatch(snackbarActions.OPEN_SNACKBAR({
+ message: 'Collection has not been created.',
+ hideDuration: 2000,
+ kind: SnackbarKind.ERROR
+ }));
+ await services.collectionService.delete(newCollection!.uuid);