Skip to content

Commit ce4e9e8

Browse files
authored
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
1 parent 3533020 commit ce4e9e8

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def get_extra_links(
7777
if not ti:
7878
raise HTTPException(
7979
status.HTTP_404_NOT_FOUND,
80-
f"DAG Run with ID = {dag_run_id} not found",
80+
"TaskInstance not found",
8181
)
8282

8383
all_extra_link_pairs = (

airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@ def _create_dag(self, dag_maker):
131131
{"detail": "DAG with ID = INVALID not found"},
132132
id="missing_dag",
133133
),
134-
pytest.param(
135-
"/dags/TEST_DAG_ID/dagRuns/INVALID/taskInstances/TEST_SINGLE_LINK/links",
136-
404,
137-
{"detail": "DAG Run with ID = INVALID not found"},
138-
id="missing_dag_run",
139-
),
140134
pytest.param(
141135
"/dags/TEST_DAG_ID/dagRuns/TEST_DAG_RUN_ID/taskInstances/INVALID/links",
142136
404,

0 commit comments

Comments
 (0)