KamranImaaz commented on code in PR #61008:
URL: https://github.com/apache/airflow/pull/61008#discussion_r2724324066


##########
providers/google/src/airflow/providers/google/cloud/operators/bigtable.py:
##########
@@ -600,16 +581,8 @@ def execute(self, context: Context) -> None:
             impersonation_chain=self.impersonation_chain,
         )
         instance = hook.get_instance(project_id=self.project_id, 
instance_id=self.instance_id)
-        if not instance:
-            raise AirflowException(f"Dependency: instance '{self.instance_id}' 
does not exist.")
-
-        try:
+        if instance:
             hook.update_cluster(instance=instance, cluster_id=self.cluster_id, 
nodes=self.nodes)
             BigtableClusterLink.persist(context=context)
-        except google.api_core.exceptions.NotFound:
-            raise AirflowException(
-                f"Dependency: cluster '{self.cluster_id}' does not exist for 
instance '{self.instance_id}'."
-            )
-        except google.api_core.exceptions.GoogleAPICallError as e:
-            self.log.error("An error occurred. Exiting.")
-            raise e
+        else:
+            raise AirflowException(f"Dependency: instance '{self.instance_id}' 
does not exist.")

Review Comment:
   Okay Sure. I Agree with 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