This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b5f1d9193 BugFix - Druid Airflow Exception to about content (#27174)
8b5f1d9193 is described below

commit 8b5f1d91936bb87ba9fa5488715713e94297daca
Author: Emin Can OGUZ <[email protected]>
AuthorDate: Mon Oct 31 13:19:11 2022 +0300

    BugFix - Druid Airflow Exception to about content (#27174)
---
 airflow/providers/apache/druid/hooks/druid.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/airflow/providers/apache/druid/hooks/druid.py 
b/airflow/providers/apache/druid/hooks/druid.py
index b7e3c71f27..abfd86d68e 100644
--- a/airflow/providers/apache/druid/hooks/druid.py
+++ b/airflow/providers/apache/druid/hooks/druid.py
@@ -88,7 +88,10 @@ class DruidHook(BaseHook):
 
         self.log.info("Druid ingestion spec: %s", json_index_spec)
         req_index = requests.post(url, data=json_index_spec, 
headers=self.header, auth=self.get_auth())
-        if req_index.status_code != 200:
+
+        code = req_index.status_code
+        if code != 200:
+            self.log.error("Error submitting the Druid job to %s (%s) %s", 
url, code, req_index.content)
             raise AirflowException(f"Did not get 200 when submitting the Druid 
job to {url}")
 
         req_json = req_index.json()

Reply via email to