uranusjr commented on a change in pull request #18523:
URL: https://github.com/apache/airflow/pull/18523#discussion_r716157117



##########
File path: airflow/api_connexion/endpoints/task_instance_endpoint.py
##########
@@ -276,12 +276,8 @@ def post_set_task_instances_state(dag_id, session):
         raise BadRequest(detail=str(err.messages))
 
     error_message = f"Dag ID {dag_id} not found"
-    try:
-        dag = current_app.dag_bag.get_dag(dag_id)
-        if not dag:
-            raise NotFound(error_message)
-    except SerializedDagNotFound:

Review comment:
       `get_dag()` still can raise `SerializedDagNotFound` after this change, 
so this `except` still needs to exist.




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