X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7486a3262490a384017ee6c826a408a017a79f55..dd99e8f75ffc29170c7ec5f264773014ebc1c7d3:/src/store/processes/process-copy-actions.ts diff --git a/src/store/processes/process-copy-actions.ts b/src/store/processes/process-copy-actions.ts index a9ae64e676..58132e9be6 100644 --- a/src/store/processes/process-copy-actions.ts +++ b/src/store/processes/process-copy-actions.ts @@ -11,6 +11,7 @@ import { ServiceRepository } from '~/services/services'; import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog'; import { getProcess, ProcessStatus, getProcessStatus } from '~/store/processes/process'; import { snackbarActions } from '~/store/snackbar/snackbar-actions'; +import { getCommonResourceServiceError, CommonResourceServiceError } from '~/services/common-service/common-resource-service'; export const PROCESS_COPY_FORM_NAME = 'processCopyFormName'; @@ -43,7 +44,8 @@ export const copyProcess = (resource: CopyFormDialogData) => dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_COPY_FORM_NAME })); return process; } catch (e) { - if (e) { + const error = getCommonResourceServiceError(e); + if (error === CommonResourceServiceError.UNKNOWN) { dispatch(dialogActions.CLOSE_DIALOG({ id: PROCESS_COPY_FORM_NAME })); throw new Error('Could not copy the process.'); }