damccorm commented on code in PR #37423:
URL: https://github.com/apache/beam/pull/37423#discussion_r2737694879


##########
sdks/python/apache_beam/transforms/enrichment_handlers/cloudsql.py:
##########
@@ -395,11 +395,11 @@ def _execute_query(
         return data
       except Exception as e:
         transaction.rollback()
-        raise RuntimeError(f"Database operation failed: {e}")
+        raise RuntimeError(f"Database operation failed: {e}") from e

Review Comment:
   If we're chaining the exception, do we still need to include the exception 
in the RuntimeError message?



##########
sdks/python/apache_beam/transforms/enrichment_handlers/cloudsql.py:
##########
@@ -395,11 +395,11 @@ def _execute_query(
         return data
       except Exception as e:
         transaction.rollback()
-        raise RuntimeError(f"Database operation failed: {e}")
+        raise RuntimeError(f"Database operation failed: {e}") from e

Review Comment:
   Same question exists below in this file as well



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to