diff --git a/sdks/python/apache_beam/yaml/yaml_mapping.py b/sdks/python/apache_beam/yaml/yaml_mapping.py index 3bef1a0a1101..9f92f59f42b6 100644 --- a/sdks/python/apache_beam/yaml/yaml_mapping.py +++ b/sdks/python/apache_beam/yaml/yaml_mapping.py @@ -467,7 +467,9 @@ def expand(self, pcoll): 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.