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


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/variables.py:
##########
@@ -67,15 +68,19 @@ def get_variable(
     team_name: Annotated[str | None, Depends(get_team_name_dep)],
 ) -> VariableResponse:
     """Get an Airflow Variable."""
+    if not variable_key:
+        raise ExecutionHTTPException(
+            status.HTTP_404_NOT_FOUND,
+            reason="not_found",
+            message="Not Found",
+        )

Review Comment:
   > We already have `variable_key: Annotated[str, Path(min_length=1)]`, is `if 
not variable_key` block necessary?
   
   You're right, that's redundant now. Thanks for catching it!



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