Skip to content

Commit 163c06f

Browse files
authored
chore: Revert change to deserialization error in Pipeline (#8591)
1 parent c8685aa commit 163c06f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

haystack/core/pipeline/base.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,15 @@ def from_dict(
176176

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

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

0 commit comments

Comments
 (0)