SameerMesiah97 commented on code in PR #69099:
URL: https://github.com/apache/airflow/pull/69099#discussion_r3488675439


##########
airflow-core/src/airflow/models/dagbag.py:
##########
@@ -104,7 +107,14 @@ def __init__(
     def _read_dag(self, serdag: SerializedDagModel) -> SerializedDAG | None:
         """Read and cache a SerializedDAG (with its ``dag_hash`` for staleness 
detection)."""
         serdag.load_op_links = self.load_op_links
-        dag = serdag.dag
+        try:
+            dag = serdag.dag
+        except Exception:

Review Comment:
   I think the exception handling is a bit too broad here. The intent is to 
handle deserialization failures, but this will also mask unrelated bugs in the 
serving path by converting them into a 404. Are you aware of the specific 
deserializations errors that are likely to arise? Why not catch them instead?



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