Eason09053360 opened a new pull request, #73463: URL: https://github.com/apache/airflow/pull/73463
## Why Two unrelated-looking leftovers in `api_fastapi`, both cases of the code saying something untrue. The NDJSON branch of `header_accept_json_or_ndjson_depends` also tests for `Mimetype.ANY`, which the first branch has already returned for — read at face value it claims `*/*` streams NDJSON, the opposite of what `get_log` documents and does. And `api_fastapi/compat.py` exists only to absorb Starlette's rename of `HTTP_422_UNPROCESSABLE_ENTITY`, but the asset events route landed two days after #69415 removed every other direct use, so it bypasses the shim: it warns on each malformed request and would turn a 422 into a 500 once Starlette drops the old name. ## What - `common/headers.py`: drop the unreachable `or accept.startswith(Mimetype.ANY)`. No behaviour change. - `execution_api/routes/asset_events.py`: take the 422 constant from `api_fastapi.compat` — the last direct use in the package. - Adds a test for the malformed-`extra` 422 path, which had none. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5) Generated-by: Claude Code (Opus 5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
