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

amoghdesai 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 ce4e9e8ea25 Fix http exception when ti not found for extra links API 
(#51443)
ce4e9e8ea25 is described below

commit ce4e9e8ea25efd30552db5cc9fb0ec68c3f18d27
Author: Amogh Desai <[email protected]>
AuthorDate: Fri Jun 6 11:43:20 2025 +0530

    Fix http exception when ti not found for extra links API (#51443)
    
    * Fix http exception when ti not found for extra links API
    
    * no question of dagrun here, remove that test
---
 .../src/airflow/api_fastapi/core_api/routes/public/extra_links.py   | 2 +-
 .../unit/api_fastapi/core_api/routes/public/test_extra_links.py     | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git 
a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py 
b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
index d6d9b04b9ef..f21be703880 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
@@ -77,7 +77,7 @@ def get_extra_links(
     if not ti:
         raise HTTPException(
             status.HTTP_404_NOT_FOUND,
-            f"DAG Run with ID = {dag_run_id} not found",
+            "TaskInstance not found",
         )
 
     all_extra_link_pairs = (
diff --git 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
index 6bede001042..1ff1d06d961 100644
--- 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
+++ 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
@@ -131,12 +131,6 @@ class TestGetExtraLinks:
                 {"detail": "DAG with ID = INVALID not found"},
                 id="missing_dag",
             ),
-            pytest.param(
-                
"/dags/TEST_DAG_ID/dagRuns/INVALID/taskInstances/TEST_SINGLE_LINK/links",
-                404,
-                {"detail": "DAG Run with ID = INVALID not found"},
-                id="missing_dag_run",
-            ),
             pytest.param(
                 
"/dags/TEST_DAG_ID/dagRuns/TEST_DAG_RUN_ID/taskInstances/INVALID/links",
                 404,

Reply via email to