Lee-W commented on code in PR #49164:
URL: https://github.com/apache/airflow/pull/49164#discussion_r2290148119


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -1932,85 +1932,92 @@ def serialize_dag(cls, dag: SdkDag) -> dict:
     @classmethod
     def deserialize_dag(cls, encoded_dag: dict[str, Any]) -> SerializedDAG:
         """Deserializes a DAG from a JSON object."""
-        if "dag_id" not in encoded_dag:
-            raise RuntimeError(
-                "Encoded dag object has no dag_id key.  You may need to run 
`airflow dags reserialize`."
+        try:

Review Comment:
   I would suggest making this try-catch block smaller. The `try` section 
should only consist of the logic that might raise certain exception



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