This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v3-0-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 9a68b80b37cfa498f3abf08aaf06f75211ab58f8 Author: Zach Liu <[email protected]> AuthorDate: Wed May 21 06:10:36 2025 -0400 EmptyOperator raises InvalidURL for non-existing logs (#50325) (cherry picked from commit 62678f90b91a45e195179c7692fe3d127ddcfafe) --- airflow-core/src/airflow/utils/log/file_task_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow-core/src/airflow/utils/log/file_task_handler.py b/airflow-core/src/airflow/utils/log/file_task_handler.py index 2e8f71d0399..90272b58422 100644 --- a/airflow-core/src/airflow/utils/log/file_task_handler.py +++ b/airflow-core/src/airflow/utils/log/file_task_handler.py @@ -605,9 +605,9 @@ class FileTaskHandler(logging.Handler): sources.append(url) logs.append(response.text) except Exception as e: - from requests.exceptions import InvalidSchema + from requests.exceptions import InvalidURL - if isinstance(e, InvalidSchema) and ti.task.inherits_from_empty_operator is True: + if isinstance(e, InvalidURL) and ti.task.inherits_from_empty_operator is True: sources.append(self.inherits_from_empty_operator_log_message) else: sources.append(f"Could not read served logs: {e}")
