From 1235bba2b2f84522f8308b0ea703cb2da53bb607 Mon Sep 17 00:00:00 2001 From: Hai Joey Tran Date: Tue, 15 Oct 2024 10:27:16 -0400 Subject: [PATCH] Polish .with_exception_handling docstring (#32739) * replace 'record' with 'input' and fix example * more tweaking --- sdks/python/apache_beam/transforms/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdks/python/apache_beam/transforms/core.py b/sdks/python/apache_beam/transforms/core.py index 9f52c97f900..775fdef71b3 100644 --- a/sdks/python/apache_beam/transforms/core.py +++ b/sdks/python/apache_beam/transforms/core.py @@ -1593,8 +1593,10 @@ def with_exception_handling( threshold=1, threshold_windowing=None, timeout=None, - error_handler=None): - """Automatically provides a dead letter output for skipping bad records. + error_handler=None, + on_failure_callback: typing.Optional[typing.Callable[ + [Exception, typing.Any], None]] = None): + """Automatically provides a dead letter output for saving bad inputs. This can allow a pipeline to continue successfully rather than fail or continuously throw errors on retry when bad elements are encountered.