You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "rjgoyln (via GitHub)" <gi...@apache.org> on 2026/08/05 18:04:00 UTC
[PR] Keep API error details when a response declares a JSON charset [airflow]
rjgoyln opened a new pull request, #71196:
URL: https://github.com/apache/airflow/pull/71196
## Summary
Both API clients treated a response as a parseable error only when `Content-Type` was exactly `application/json`, so any media type carrying parameters — `application/json; charset=utf-8`, as proxies and gateways routinely emit on the errors they generate themselves — skipped error parsing and fell through to `raise_for_status()`. That loses the server's `detail`, and it raises a plain `httpx.HTTPStatusError`, so the `except ServerResponseError` branches in the supervisor and in the CLI commands stop matching.
Airflow's own API server is unaffected — Starlette appends a charset only to `text/*` responses — so this surfaces only where something between client and API server rewrites the header. Parameters are now stripped and the media type case folded; `application/problem+json` remains unaccepted.
---
##### 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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Keep API error details when a response declares a JSON charset [airflow]
Posted by "rjgoyln (via GitHub)" <gi...@apache.org>.
rjgoyln commented on PR #71196:
URL: https://github.com/apache/airflow/pull/71196#issuecomment-5197259656
Closing in favour of #70936, which already covers the airflow-ctl side of this. The Task SDK client has the same exact-string `content-type` comparison, so it is folded into that PR instead of being fixed separately here.
---
Drafted-by: Claude Code (Opus 5) (no human review before posting)
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Keep API error details when a response declares a JSON charset [airflow]
Posted by "rjgoyln (via GitHub)" <gi...@apache.org>.
rjgoyln closed pull request #71196: Keep API error details when a response declares a JSON charset
URL: https://github.com/apache/airflow/pull/71196
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org