feat: Update error raised by Agent if a runtime error occurs#10573
Draft
feat: Update error raised by Agent if a runtime error occurs#10573
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
tstadel
approved these changes
Feb 12, 2026
Member
tstadel
left a comment
There was a problem hiding this comment.
That would fully fix the platform visualization. No further platform changes needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
cc @c-bonucci
This updates the error creation in Agent when a error occurs in the underlying
chat_generatorortool_invokerby creating a newPipelineRuntimeErrorobject that is raised from the one caused by a failing chat generator or tool invoker.By doing this we are able to provide relevant information to end-users to inspect the error object and determine that the error came from/belongs to the Agent component within a pipeline. By inspecting the attributes
component_nameandcomponent_typeof thePipelineRuntimeErrorobject users can now see that they resolve tocomponent_name="name of agent in pipeline"andcomponent_type=haystack.components.agents.agent.Agentwhereas before they would have resolved tochat_generatorandhaystack.components.generators.chat.openai.OpenAIChatGenerator(or whatever generator they passed).Also the error message is updated. Previously it would have been
and now it will be
How did you test it?
Notes for the reviewer
I'm open to further tweaking the error message to better convey that an internal component within Agent failed. So the above message is not set in stone.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes.