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


##########
airflow/providers/docker/operators/docker.py:
##########
@@ -44,6 +44,30 @@
     from airflow.utils.context import Context
 
 
+class DockerContainerFailedException(AirflowException):
+    """
+    Raised when a Docker container returns an error.
+
+    :param logs: The log output of the failed Docker container
+    """
+
+    def __init__(self, message: str | None = None, logs: list[str | bytes] | 
None = None):
+        super().__init__(message)
+        self.logs = logs
+
+
+class DockerContainerFailedSkipException(AirflowSkipException):
+    """
+    Raised when a Docker container returns an error and task should be skipped.
+
+    :param logs: The log output of the failed Docker container
+    """
+
+    def __init__(self, message: str | None = None, logs: list[str | bytes] | 
None = None):
+        super().__init__(message)
+        self.logs = logs

Review Comment:
   Lets extract these classes to exceptions.py
   like we have in amazon provider:
   
https://github.com/apache/airflow/blob/9a643363e982b7c37d3c7f9015cd7869bc2935c2/airflow/providers/amazon/aws/exceptions.py



-- 
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