19691: Avoid showing generic errors on collection & project create dialogs.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 9 Dec 2022 16:00:31 +0000 (17:00 +0100)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Fri, 9 Dec 2022 16:00:31 +0000 (17:00 +0100)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

src/store/collections/collection-create-actions.ts
src/store/projects/project-create-actions.ts

index 17fecc1e15b740681b8759d84dd7e01dc5bb0a0f..92e773c9a687af7b77f140674c205603b3089feb 100644 (file)
@@ -59,7 +59,7 @@ export const createCollection = (data: CollectionCreateFormDialogData) =>
         let newCollection: CollectionResource | undefined;
         try {
             dispatch(progressIndicatorActions.START_WORKING(COLLECTION_CREATE_FORM_NAME));
-            newCollection = await services.collectionService.create(data);
+            newCollection = await services.collectionService.create(data, false);
             await dispatch<any>(uploadCollectionFiles(newCollection.uuid));
             dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_CREATE_FORM_NAME }));
             dispatch(reset(COLLECTION_CREATE_FORM_NAME));
index 23eaf7a4a56aaa077083f0f738c37ad5f81ebb6e..ddf5064e31ec9fdb9dd02f7e2d7267f0945dcb09 100644 (file)
@@ -65,7 +65,7 @@ export const createProject = (project: Partial<ProjectResource>) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         dispatch(startSubmit(PROJECT_CREATE_FORM_NAME));
         try {
-            const newProject = await services.projectService.create(project);
+            const newProject = await services.projectService.create(project, false);
             dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_CREATE_FORM_NAME }));
             dispatch(reset(PROJECT_CREATE_FORM_NAME));
             return newProject;