Validate dag_id argument (#4593)

This commit is contained in:
Pere Miquel Brull 2022-04-29 18:20:29 +02:00 committed by GitHub
parent f3c107025a
commit 4ec9f3e117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,6 +219,12 @@ class REST_API(AppBuilderBaseView):
"""
dag_id: str = self.get_request_arg(request, "dag_id")
if not dag_id:
return ApiResponse.error(
status=ApiResponse.STATUS_BAD_REQUEST,
error=f"Missing dag_id argument in the request",
)
try:
return status(dag_id)