Add possibility to catch all errors on a tool
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3547994. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !220 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Right now you have to throw specific errors for the agent to continue running. However this should be possible for an agent creator to decide themselves. </p> <p>If you for instance don't have permissions to run a tool, currently the whole run dies and it stops executing there and the UI has to take care of presenting this to the end user. But there could easily be agents that should be available to different roles, where it should be possible for certain roles to do more then others.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Add a checkbox per tool in the settings, to catch all errors and give them back to the agent.</li> <li>Keep it unchecked by default.</li> <li>If its checked, set a large try and catch around the tool running and if its fails, return the error message to the agent.</li> </ul>
issue