henry3260 commented on code in PR #72890:
URL: https://github.com/apache/airflow/pull/72890#discussion_r3980415562
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -272,7 +272,13 @@ def ti_run(
if not dr:
log.error("DagRun not found", dag_id=ti.dag_id, run_id=ti.run_id)
- raise ValueError(f"DagRun with dag_id={ti.dag_id} and
run_id={ti.run_id} not found.")
+ raise HTTPException(
+ status_code=status.HTTP_404_NOT_FOUND,
+ detail={
+ "reason": "not_found",
+ "message": f"DagRun with dag_id={ti.dag_id} and
run_id={ti.run_id} not found.",
Review Comment:
Just for consistency with the other HTTPException messages in this file
```suggestion
"message": f"DagRun with dag_id={ti.dag_id} and
run_id={ti.run_id} not found",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]