Skip to content

Commit

Permalink
chore: Revert change to deserialization error in Pipeline (#8591)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeMe authored Nov 28, 2024
1 parent c8685aa commit 163c06f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions haystack/core/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,15 @@ def from_dict(

try:
instance = component_from_dict(component_class, component_data, name, callbacks)
except Exception as error:
except Exception as e:
msg = (
f"Couldn't deserialize component '{name}' of class '{component_class.__name__}' because of:"
f"{error}"
"Component was deserialized with the following data:"
f"{str(component_data)}."
"Possible reasons include malformed serialized data, mismatch between the serialized component "
"and the loaded one (due to a breaking change, see "
f"Couldn't deserialize component '{name}' of class '{component_class.__name__}' "
f"with the following data: {str(component_data)}. Possible reasons include "
"malformed serialized data, mismatch between the serialized component and the "
"loaded one (due to a breaking change, see "
"https://github.com/deepset-ai/haystack/releases), etc."
)
raise DeserializationError(msg) from error
raise DeserializationError(msg) from e
pipe.add_component(name=name, instance=instance)

for connection in data.get("connections", []):
Expand Down

0 comments on commit 163c06f

Please sign in to comment.