Skip to content

Fix GET /auth/login missing 400 in OpenAPI spec and use status constant#67571

Merged
vincbeck merged 3 commits into
apache:mainfrom
ColtenOuO:fix-auth-login-missing-400-in-openapi-doc
May 27, 2026
Merged

Fix GET /auth/login missing 400 in OpenAPI spec and use status constant#67571
vincbeck merged 3 commits into
apache:mainfrom
ColtenOuO:fix-auth-login-missing-400-in-openapi-doc

Conversation

@ColtenOuO
Copy link
Copy Markdown
Contributor

The /auth/login endpoint raises HTTP 400 when the next redirect URL is invalid or unsafe, but this response code was missing from the responses decorator — so the generated OpenAPI spec didn't document it.

Changes:

  • Add HTTP_400_BAD_REQUEST to create_openapi_http_exception_doc for the login endpoint
  • Replace raw integer 400 with status.HTTP_400_BAD_REQUEST for consistency with the rest of the codebase

@ColtenOuO
Copy link
Copy Markdown
Contributor Author

Celery integration test failed without producing any test output — appears to be a runner infrastructure issue unrelated to this PR.

@vincbeck
Copy link
Copy Markdown
Contributor

Celery integration test failed without producing any test output — appears to be a runner infrastructure issue unrelated to this PR.

Still, some front-end artifacts are generated from openapi specs, please run prek to fix the static check failures

@ColtenOuO
Copy link
Copy Markdown
Contributor Author

I have run prek to fix static check failures.

The test uses cmd_timeout=0.001 (1ms) to verify timeout behavior, but on a loaded CI runner, paramiko raises SSHException: Timeout opening channel before the channel is even established — a different exception type than expected. This is a pre-existing flaky test tracked in #65864.

I think the new failure is unrelated to this PR (?

@vincbeck
Copy link
Copy Markdown
Contributor

I have run prek to fix static check failures.

The test uses cmd_timeout=0.001 (1ms) to verify timeout behavior, but on a loaded CI runner, paramiko raises SSHException: Timeout opening channel before the channel is even established — a different exception type than expected. This is a pre-existing flaky test tracked in #65864.

I think the new failure is unrelated to this PR (?

You are correct

@vincbeck vincbeck merged commit 6470172 into apache:main May 27, 2026
142 of 143 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants