21128: fixed frozen move error handler Arvados-DCO-1.1-Signed-off-by: Lisa Knox ...
[arvados-workbench2.git] / src / store / workbench / workbench-actions.ts
index b03400d5ae28c7abc55b86ac5e0f01e99668e95a..72b818fd0f8256200fdc10a74fa03bfca86e01cc 100644 (file)
@@ -109,6 +109,12 @@ export const isWorkbenchLoading = (state: RootState) => {
 export const handleFirstTimeLoad = (action: any) => async (dispatch: Dispatch<any>, getState: () => RootState) => {
     try {
         await dispatch(action);
+    } catch (e) {
+        snackbarActions.OPEN_SNACKBAR({
+            message: "Error " + e,
+            hideDuration: 8000,
+            kind: SnackbarKind.WARNING,
+        })
     } finally {
         if (isWorkbenchLoading(getState())) {
             dispatch(progressIndicatorActions.STOP_WORKING(WORKBENCH_LOADING_SCREEN));
@@ -328,7 +334,7 @@ export const moveProject =
                 } catch (e) {
                     dispatch(
                         snackbarActions.OPEN_SNACKBAR({
-                            message: e.message,
+                            message: !!(project as any).frozenByUuid ? 'Could not move frozen project.' : e.message,
                             hideDuration: 2000,
                             kind: SnackbarKind.ERROR,
                         })