Description
Apache Airflow version
3.0.2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
SnowflakeSqlApiOperator's get_sql_api_query_status
method directly tries to do response.json
and this sometimes fails with JSONDecode error when the response isn't a JSON.
We should first do response.raise_for_status()
to ensure we don't try to parse response body when the API request has failed.
What you think should happen instead?
No response
How to reproduce
It's an intermittent issue and I am not sure how to reproduce this. But, we can definitely have a test case where response not a JSON.
Operating System
mac os
Versions of Apache Airflow Providers
main
Deployment
Astronomer
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct