Yusin0903 commented on code in PR #49164:
URL: https://github.com/apache/airflow/pull/49164#discussion_r2291578954
##########
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:
Thanks for the suggestion. Since many parts of the deserialization could
raise errors, I included most of the logic in the try block. Do you have
specific parts you recommend isolating for better error handling?
--
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]