diff --git a/src/components/BulkEditList/BulkEditListSidebar/IdentifierTab/IdentifierTab.js b/src/components/BulkEditList/BulkEditListSidebar/IdentifierTab/IdentifierTab.js index d521f3b9..a709e902 100644 --- a/src/components/BulkEditList/BulkEditListSidebar/IdentifierTab/IdentifierTab.js +++ b/src/components/BulkEditList/BulkEditListSidebar/IdentifierTab/IdentifierTab.js @@ -14,7 +14,7 @@ import { Capabilities } from '../../../shared/Capabilities/Capabilities'; import { ListSelect } from '../../../shared/ListSelect/ListSelect'; import { CRITERIA, - EDITING_STEPS, + EDITING_STEPS, ERRORS, IDENTIFIER_FILTERS, JOB_STATUSES, TRANSLATION_SUFFIX @@ -133,11 +133,12 @@ export const IdentifierTab = () => { identifierType: recordIdentifier, }); - const { status } = await bulkOperationStart({ + const { status, errorMessage } = await bulkOperationStart({ id, step: EDITING_STEPS.UPLOAD, }); + if (errorMessage.includes(ERRORS.TOKEN)) throw Error(ERRORS.TOKEN); if (status === JOB_STATUSES.FAILED) throw Error(); history.replace({ @@ -147,10 +148,17 @@ export const IdentifierTab = () => { setIsFileUploaded(true); } catch ({ message }) { - showCallout({ - message: , - type: 'error', - }); + if (message === ERRORS.TOKEN) { + showCallout({ + message: , + type: 'error', + }); + } else { + showCallout({ + message: , + type: 'error', + }); + } } };