KamranImaaz opened a new issue, #60627:
URL: https://github.com/apache/airflow/issues/60627

   ### Apache Airflow Provider(s)
   
   google
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Apache Airflow version
   
   3.2.0
   
   ### Operating System
   
   Windows(Local Development)
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   `BigQueryGetDatasetOperator` in `Bigquery.py` has some issues when it fails 
due to 2 reasons
   `DefaultCredentialsError` when the credentials required for GCP auth is 
Wrong or
   `NotFound` when the dataset itself does not exists.
   
   So often the Stack traces are long and lengthy and there is on one liner to 
brief about the issue.
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   **1. Reproduction: Auth failure**
   
   Configure a DAG using `BigQueryGetDatasetOperator`
   
   **Use:**
   
   Invalid `gcp_conn_id`
   
   OR remove Google credentials
   
   Trigger DAG
   
   **Before**
   
   `Task fails with long Google auth traceback`
   
   **After**
   
   `AirflowException: Could not get dataset, no valid Google Cloud credentials 
were found.`
   
   **2. Reproduction: Dataset does not exist**
   
   Use valid GCP credentials
   
   **Provide:**
   
   Correct `project_id`
   
   Non-existent `dataset_id`
   
   Trigger DAG
   
   **Before**
   
   `Raw 404 NotFound Google exception`
   
   **After**
   
   `AirflowException: Dataset my_dataset not found in project my_project.`
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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