eladkal commented on code in PR #46593:
URL: https://github.com/apache/airflow/pull/46593#discussion_r1948031869


##########
providers/src/airflow/providers/amazon/aws/sensors/rds.py:
##########
@@ -129,13 +128,19 @@ def __init__(
             "canceling",
             "canceled",
         ]
+        self.error_statuses = error_statuses or ["failed"]
 
     def poke(self, context: Context):
         self.log.info(
             "Poking for statuses : %s\nfor export task %s", 
self.target_statuses, self.export_task_identifier
         )
         try:
             state = 
self.hook.get_export_task_state(self.export_task_identifier)
+            if state in self.error_statuses:
+                raise AirflowFailException(
+                    f"Export task {self.export_task_identifier} failed with 
status {state}"

Review Comment:
   Why `AirflowFailException`?



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to