jason810496 commented on code in PR #49164:
URL: https://github.com/apache/airflow/pull/49164#discussion_r2287490403
##########
airflow-core/src/airflow/exceptions.py:
##########
@@ -517,6 +517,23 @@ class UnknownExecutorException(ValueError):
"""Raised when an attempt is made to load an executor which is not
configured."""
+class DeserializationError(Exception):
+ """
+ Raised when a Dag cannot be deserialized.
+
+ This exception should be raised using exception chaining:
+ `raise DeserializationError(dag_id) from original_exception`
+ """
+
+ def __init__(self, dag_id: str | None = None):
+ self.dag_id = dag_id
+ if dag_id == "unknown":
Review Comment:
```suggestion
if dag_id is None:
```
--
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]