Skip to content

fix: handle LLM and graph errors in weather agent executor - #142

Merged
pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:fix/handle-llm-errors-in-executor
Mar 3, 2026
Merged

fix: handle LLM and graph errors in weather agent executor#142
pdettori merged 1 commit into
rossoctl:mainfrom
pdettori:fix/handle-llm-errors-in-executor

Conversation

@pdettori

@pdettori pdettori commented Mar 3, 2026

Copy link
Copy Markdown
Member

The execute() method had no error handling around get_graph() and graph.astream(). When the LLM call fails (bad API key, model unavailable, network error), the unhandled exception left the A2A task stuck in "submitted" state with no artifacts and no error message — making failures invisible to both tests and users.

Now graph initialization and LLM execution errors are caught and reported as failed tasks with the actual error message, matching the existing pattern for MCP connection failures.

Summary

Related issue(s)

(Optional) Testing Instructions

Fixes #

The execute() method had no error handling around get_graph() and
graph.astream(). When the LLM call fails (bad API key, model
unavailable, network error), the unhandled exception left the A2A
task stuck in "submitted" state with no artifacts and no error
message — making failures invisible to both tests and users.

Now graph initialization and LLM execution errors are caught and
reported as failed tasks with the actual error message, matching
the existing pattern for MCP connection failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>

@Ladas Ladas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pdettori
pdettori merged commit 3edbd7b into rossoctl:main Mar 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants