X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f8fb6725beec5b2bf0eec7f375d49f9189ff1bc3..55e9d0bcceeb7c88f7bd8d0b20408c6b87846ff2:/src/index.tsx diff --git a/src/index.tsx b/src/index.tsx index 1a58dad16e..d07d3c9e02 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -62,6 +62,7 @@ import { collectionAdminActionSet } from '~/views-components/context-menu/action import { processResourceAdminActionSet } from '~/views-components/context-menu/action-sets/process-resource-admin-action-set'; import { projectAdminActionSet } from '~/views-components/context-menu/action-sets/project-admin-action-set'; import { snackbarActions, SnackbarKind } from "~/store/snackbar/snackbar-actions"; +import { openNotFoundDialog } from './store/not-found-panel/not-found-panel-action'; console.log(`Starting arvados [${getBuildInfo()}]`); @@ -106,13 +107,18 @@ fetchConfig() errorFn: (id, error, showSnackBar) => { if (showSnackBar) { console.error("Backend error:", error); - store.dispatch(snackbarActions.OPEN_SNACKBAR({ - message: `${error.errors - ? error.errors[0] - : error.message}`, - kind: SnackbarKind.ERROR, - hideDuration: 8000}) - ); + + if (error.errors[0].indexOf("not found") > -1) { + store.dispatch(openNotFoundDialog()); + } else { + store.dispatch(snackbarActions.OPEN_SNACKBAR({ + message: `${error.errors + ? error.errors[0] + : error.message}`, + kind: SnackbarKind.ERROR, + hideDuration: 8000}) + ); + } } } });