shahar1 commented on code in PR #60628:
URL: https://github.com/apache/airflow/pull/60628#discussion_r2697624499


##########
providers/google/src/airflow/providers/google/cloud/operators/bigquery.py:
##########
@@ -1635,14 +1636,24 @@ def execute(self, context: Context):
         )
 
         self.log.info("Start getting dataset: %s:%s", self.project_id, 
self.dataset_id)
+        try:
+            dataset = bq_hook.get_dataset(dataset_id=self.dataset_id, 
project_id=self.project_id)
+        except DefaultCredentialsError as e:
+            raise AirflowException(
+                "Could not get dataset, no valid Google Cloud credentials were 
found."
+            ) from e
+        except NotFound as e:
+            raise AirflowException(
+                f"Dataset {self.dataset_id} not found in project 
{self.project_id}."
+            ) from e

Review Comment:
   https://github.com/apache/airflow/issues/60627
   
   Please see my comments in the original issue:



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