-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: error on invalid type #8711
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 12744599424Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR...
Do you know when this problem happens? When are we serializing empty types?
Also, what do you think about catching empty strings earlier in the process? It might be helpful to raise a clearer error message. Maybe extend the check here, for instance:
Extend the check here, for example
if "type" not in component_data:
raise PipelineError(f"Missing 'type' in component '{name}'")
I think this type of error is a bit exotic, dc's pipeline builder falls back to empty string if a component type is not known. But this can be fixed otherwise. For haystack, there should be just a reasonable error message in that case. Do you think it's worth the granularity? An empty string is one case where it breaks, a string without "." is another. The proposed solution solves both in very simple way. |
Related Issues
''
is passed:ValueError: not enough values to unpack (expected 2, got 1)
Proposed Changes:
PipelineError
How did you test it?
Notes for the reviewer
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
and added!
in case the PR includes breaking changes.