Handle an error for a tool run.
(
self,
error: BaseException,
*,
run_id: UUID,
**kwargs: Any,
)
| 277 | return tool_run |
| 278 | |
| 279 | def on_tool_error( |
| 280 | self, |
| 281 | error: BaseException, |
| 282 | *, |
| 283 | run_id: UUID, |
| 284 | **kwargs: Any, |
| 285 | ) -> Run: |
| 286 | """Handle an error for a tool run.""" |
| 287 | tool_run = self._errored_tool_run( |
| 288 | error=error, |
| 289 | run_id=run_id, |
| 290 | ) |
| 291 | self._end_trace(tool_run) |
| 292 | self._on_tool_error(tool_run) |
| 293 | return tool_run |
| 294 | |
| 295 | def on_retriever_start( |
| 296 | self, |
no test coverage detected