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 5ad42d7fbf Fix HttpHook.run_with_advanced_retry document error (#24380)
5ad42d7fbf is described below
commit 5ad42d7fbfbd02c602af34dfb2f181fc1f575bdc
Author: Chenglong Yan <[email protected]>
AuthorDate: Mon Jun 13 15:14:32 2022 +0800
Fix HttpHook.run_with_advanced_retry document error (#24380)
related: #9569
---
airflow/providers/http/hooks/http.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/providers/http/hooks/http.py
b/airflow/providers/http/hooks/http.py
index 54c4b3125d..98a36ec747 100644
--- a/airflow/providers/http/hooks/http.py
+++ b/airflow/providers/http/hooks/http.py
@@ -203,7 +203,7 @@ class HttpHook(BaseHook):
retry_args = dict(
wait=tenacity.wait_exponential(),
stop=tenacity.stop_after_attempt(10),
- retry=requests.exceptions.ConnectionError,
+ retry=tenacity.retry_if_exception_type(Exception),
)
hook.run_with_advanced_retry(endpoint="v1/test",
_retry_args=retry_args)