Close Page action in relation to an error

Hi, I have a microflow that closes the current page and then calls a sub flow to submit finalized work to a REST call and request a new piece of work via a second REST call. I'm finding that the first REST call succeeds but the second fails because there is no more work available. We trap the error message returned to display a custom error message. When the user clicks to acknowledge the error, the application goes back to the calling page. Apparently the error overrides the "close page" action. It appears that the "close page" action is held up until the rest of the microflow completes. Is this expected and if so, how do I ensure the page closes after the error is acknowledged. Currently users are able to click the finalize button again which calls the finalize work REST call again creating a duplicate record. Thanks
1 answers

Close page action is always executed at the end of the microflow (when the rest is finished).

If the error message is displayed in a new page/popup you should model a flow to close this one as well (after acknowledgement)