raphaelauv commented on code in PR #40924:
URL: https://github.com/apache/airflow/pull/40924#discussion_r1687593473


##########
airflow/sensors/base.py:
##########
@@ -186,11 +208,44 @@ def __init__(
         self.mode = mode
         self.exponential_backoff = exponential_backoff
         self.max_wait = self._coerce_max_wait(max_wait)
-        if soft_fail is True and never_fail is True:
-            raise ValueError("soft_fail and never_fail are mutually exclusive, 
you can not provide both.")
+        if skip_policy != NOTSET:
+            if sum([soft_fail, silent_fail]) > 0:
+                raise ValueError(
+                    "skip_policy and deprecated soft_fail and silent_fail 
parameters are mutually exclusive."
+                )
+
+            if skip_policy == SkipPolicy.SKIP_ON_SOFT_ERROR:

Review Comment:
   users already repack custom exceptions 
https://github.com/apache/airflow/blob/e9d2d5c86a714d6aea7c4dfb3b8cf72e54b9035c/airflow/providers/sftp/sensors/sftp.py#L103
   
   ```Can the user add support for it from deployment side```
   
   It feel like this is another feature , we can create an issue to track that
   



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