pierrejeambrun commented on code in PR #61550:
URL: https://github.com/apache/airflow/pull/61550#discussion_r2895126308


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -494,6 +503,8 @@ def trigger_dag_run(
             current_user_id = user.get_id()
             dag_run.note = (dag_run_note, current_user_id)
         return dag_run
+    except AirflowException as e:
+        raise HTTPException(status.HTTP_404_NOT_FOUND, str(e))

Review Comment:
   You need to verify the error message. Maybe put a generic 400 error instead. 
Because there are other branches that raise different AirflowException such as 
   ```
           raise AirflowException(f"Cannot create DagRun for DAG {dag.dag_id} 
because the dag is not serialized")
   ```



-- 
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]

Reply via email to