Replay data not stored if an exception is thrown
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3583093. -->
Reported by: [freelock](https://www.drupal.org/user/313537)
Related to !606
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When trying to use the new debugging feature with the new workflow modeler, you cannot get any replay data if any exception is thrown while the model is being run.</p>
<p>This leads to the debugger remaining active, and no useful token data to step through to find the problem.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Create a model with invalid tokens (in my case, was trying to convert some code to a model using an AI agent).</p>
<p>Hit the "test" button, and do whatever action triggers the model in another window.</p>
<p>Observe that the test mode stays active, and no data comes through. Using the refresh button shows a "no replay data available" message. In the key_value_expire table, the event has an empty serialized array.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Make sure that replay data gets logged correctly for models that fail to execute completely -- at least show the data through the steps up to the exception.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
> Related issue: [Issue #3583417](https://www.drupal.org/node/3583417)
issue