This is an automated email from the ASF dual-hosted git repository.
robertwb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 8f75c61cfd9 More complete error message for StripErrorMetadata.
(#33110)
8f75c61cfd9 is described below
commit 8f75c61cfd9809d105cd865037b2ae3f076d503d
Author: Robert Bradshaw <[email protected]>
AuthorDate: Mon Nov 25 11:54:12 2024 -0800
More complete error message for StripErrorMetadata. (#33110)
* More complete error message for StripErrorMetadata.
* Update sdks/python/apache_beam/yaml/yaml_mapping.py
Co-authored-by: Danny McCormick <[email protected]>
* fix formatting, paren
---------
Co-authored-by: Danny McCormick <[email protected]>
---
sdks/python/apache_beam/yaml/yaml_mapping.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sdks/python/apache_beam/yaml/yaml_mapping.py
b/sdks/python/apache_beam/yaml/yaml_mapping.py
index 3bef1a0a110..9f92f59f42b 100644
--- a/sdks/python/apache_beam/yaml/yaml_mapping.py
+++ b/sdks/python/apache_beam/yaml/yaml_mapping.py
@@ -467,7 +467,9 @@ class _StripErrorMetadata(beam.PTransform):
break
else:
raise ValueError(
- f"No field name matches one of {self._ERROR_FIELD_NAMES}")
+ 'The input to this transform does not appear to be an error ' +
+ "output. Expected a schema'd input with a field named " +
+ ' or '.join(repr(fld) for fld in self._ERROR_FIELD_NAMES))
if fld is None:
# This handles with_exception_handling() that returns bare tuples.