KushagraB424 opened a new pull request, #69629: URL: https://github.com/apache/airflow/pull/69629
### Description In `task-sdk/src/airflow/sdk/execution_time/supervisor.py`, exception details from the task runner subprocess were being passed as a dictionary via the log event from `structlog`. An existing `TODO` comment indicated that this dictionary should be converted back into a pretty stack trace before being assigned to the `error_detail` field. Because it was left as a raw dictionary, it prevented operators from natively viewing readable stack traces in the logs. This PR resolves the `TODO` by adding a private formatting utility function (`_format_exception_dict`) that correctly handles the `structlog` exception dictionary format (similar to what was recently done for the Triggerer). It safely iterates over the parsed exception dictionaries and reconstructs standard Python stack traces (including nested `__cause__` and `__context__` chains). The raw dictionary is now seamlessly parsed back into a human-readable traceback string before being logged. <!-- Note: If you opened an issue for this, you can add "closes: #ISSUE" here --> --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes (please specify the tool below) Generated-by: Antigravity -- 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]
