jason810496 commented on code in PR #63801:
URL: https://github.com/apache/airflow/pull/63801#discussion_r3033231072


##########
airflow-core/src/airflow/api_fastapi/common/exceptions.py:
##########
@@ -122,4 +122,35 @@ def exception_handler(self, request: Request, exc: 
DeserializationError):
         )
 
 
+class ExecutionHTTPException(HTTPException):
+    """
+    HTTPException subclass used by Execution API.
+
+    Enforces consistent error response format containing `reason` and 
`message` keys.
+    """
+
+    def __init__(
+        self,
+        status_code: int,
+        detail: dict[str, Any] | str | None = None,
+        headers: dict[str, str] | None = None,
+    ) -> None:

Review Comment:
   I would suggest to change the constructor interface to accept `reason` and 
`message` instead of having `detail: dict[str, Any]` to avoid the ambiguity. 
Since the having `dict` might still introduce inconsistency in the future.



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