This is an automated email from the ASF dual-hosted git repository.

damccorm 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 d4f5372a67c Improve error message for decoding input stream (#36823)
d4f5372a67c is described below

commit d4f5372a67c823a0bc183e9fe5efb76fa126fc4c
Author: Danny McCormick <[email protected]>
AuthorDate: Mon Nov 17 10:33:15 2025 -0500

    Improve error message for decoding input stream (#36823)
    
    * Improve error message for decoding input stream
    
    * Fix string interpolation in error message
---
 sdks/python/apache_beam/runners/worker/bundle_processor.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/runners/worker/bundle_processor.py 
b/sdks/python/apache_beam/runners/worker/bundle_processor.py
index 4094fd1d805..faa756d7c5c 100644
--- a/sdks/python/apache_beam/runners/worker/bundle_processor.py
+++ b/sdks/python/apache_beam/runners/worker/bundle_processor.py
@@ -234,9 +234,11 @@ class DataInputOperation(RunnerIOOperation):
         decoded_value = self.windowed_coder_impl.decode_from_stream(
             input_stream, True)
       except Exception as exn:
+        coder = str(self.windowed_coder)
+        step = self.name_context.step_name
         raise ValueError(
-            "Error decoding input stream with coder " +
-            str(self.windowed_coder)) from exn
+            f"Error decoding input stream with coder {coder} in step {step}"
+        ) from exn
       self.output(decoded_value)
 
   def monitoring_infos(

Reply via email to