ramitkataria commented on code in PR #54299:
URL: https://github.com/apache/airflow/pull/54299#discussion_r2267735631


##########
providers/amazon/src/airflow/providers/amazon/aws/hooks/base_aws.py:
##########
@@ -621,19 +617,12 @@ def conn_config(self) -> AwsConnectionWrapper:
         if self.aws_conn_id:
             try:
                 connection = self.get_connection(self.aws_conn_id)
-            except Exception as e:
-                not_found_exc_via_core = isinstance(e, 
AirflowNotFoundException)
-                not_found_exc_via_task_sdk = (
-                    AIRFLOW_V_3_0_PLUS
-                    and isinstance(e, AirflowRuntimeError)
-                    and e.error.error == ErrorType.CONNECTION_NOT_FOUND
+            except AirflowNotFoundException:
+                self.log.warning(
+                    "Unable to find AWS Connection ID '%s', switching to 
empty.", self.aws_conn_id
                 )
-                if not_found_exc_via_core or not_found_exc_via_task_sdk:
-                    self.log.warning(
-                        "Unable to find AWS Connection ID '%s', switching to 
empty.", self.aws_conn_id
-                    )
-                else:
-                    raise
+            except Exception:
+                raise

Review Comment:
   I think we can just remove these 2 lines, right?



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