Commit 0af28ed
fix: handle LLM and graph errors in weather agent executor
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>1 parent 7249809 commit 0af28ed
1 file changed
Lines changed: 23 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
139 | 148 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
| |||
0 commit comments