rjgoyln opened a new pull request, #71424:
URL: https://github.com/apache/airflow/pull/71424

   ## Summary
   
   `safe_call_command` catches `ServerResponseError` but not the 
`httpx.HTTPStatusError` it inherits from, and only a JSON error body ever 
becomes a `ServerResponseError`. Every other error response therefore escapes 
as an unhandled exception, and the user gets a traceback where a message 
belongs.
   
   Those responses come from whatever sits in front of the API server rather 
than from Airflow — a reverse proxy returning its own `text/html` 502 during a 
restart, or an SSO gateway answering with a login page. Since the traceback 
names httpx, it reads as a client bug. The command now exits 1 with the status 
and the response's content type, enough to place the blame correctly.
   
   Independent of #70936, which widens the media-type check in the API client.
   
   ---
   
   ##### 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]

Reply via email to