TypeError in AiAgentStatusPollerService::getLatestStatusUpdates() when no status update exists
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3547131. --> Reported by: [narendrar](https://www.drupal.org/user/1730192) Related to !188 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When polling for agent status updates using the <code>ai_agents.agent_status_poller</code> service, a fatal TypeError is thrown if <code>getLatestStatusUpdates()</code> is called for a thread ID that has no status updates stored yet.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <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 #3543377](https://www.drupal.org/node/3543377)
issue