pierrejeambrun opened a new pull request, #71440: URL: https://github.com/apache/airflow/pull/71440
Internal SDK API client errors raise `ServerResponseError`, which deliberately keeps the server's error payload as structured `.detail` behind a generic message so handlers can log it as a structured field (`log.info(..., detail=e.detail)`). On paths where the error propagates **uncaught** to a generic logger — e.g. the executor / celery `trace_task` — only `str(exc)` (`"Server returned error"`) is shown and the detail is lost. That's the case in #57961 (the `task_instances.start()` path). This attaches the structured detail as an **exception note**, following the same `add_note` pattern already used for the correlation-id in `raise_on_4xx_5xx_with_note`. The detail then shows up in tracebacks that propagate uncaught, while `.detail` (structured, used by handlers) and the generic message are left unchanged. Exception notes require Python 3.11+, consistent with the existing correlation-id note (the reporter is on 3.12). closes: #57961 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.8) Generated-by: Claude Code (Opus 4.8) 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]
