diff --git a/src/components/editor/actions/MarcButton.jsx b/src/components/editor/actions/MarcButton.jsx index 14475f24f..3fec617f3 100644 --- a/src/components/editor/actions/MarcButton.jsx +++ b/src/components/editor/actions/MarcButton.jsx @@ -27,7 +27,10 @@ const MarcButton = () => { marcs.current[resourceKey] = { marc: body, marcUrl: url } setRender(shortid.generate()) }) - .catch((err) => marcs.current[resourceKey] = { error: err.message || err }) + .catch((err) => { + marcs.current[resourceKey] = { error: err.message || err } + setRender(shortid.generate()) + }) } const handleRequest = (event) => { @@ -36,7 +39,10 @@ const MarcButton = () => { .then((marcJobUrl) => { marcJobTimer(marcJobUrl, resourceKey) }) - .catch((err) => marcs.current[resourceKey] = { error: err.message || err }) + .catch((err) => { + marcs.current[resourceKey] = { error: err.message || err } + setRender(shortid.generate()) + }) event.preventDefault() } @@ -89,7 +95,7 @@ const MarcButton = () => { &&