KushagraB424 opened a new issue, #69572:
URL: https://github.com/apache/airflow/issues/69572
### Under which category would you file this issue?
Airflow Core
### Apache Airflow version
main
### What happened and how to reproduce it?
In `airflow-core/src/airflow/jobs/triggerer_job_runner.py` (around line 1044
in the `_process_log_messages_from_subprocess` method), exception details from
the triggerer subprocess are popped from the log event as a raw dictionary and
assigned directly to `event["error_detail"]`.
Because it remains a dictionary, it doesn't render as a readable stack trace
in the logs. There is a `TODO` explicitly written in the code for this:
```python
if exc := event.pop("exception", None):
# TODO: convert the dict back to a pretty stack trace
event["error_detail"] = exc
```
### What you think should happen instead?
The dictionary representation of the exception should be converted back into
a formatted traceback string before being logged. This will make it much easier
for users and operators to read triggerer errors natively in their logs.
### Operating System
Not Applicable
### Deployment
None
### Apache Airflow Provider(s)
_No response_
### Versions of Apache Airflow Providers
Not Applicable
### Official Helm Chart version
Not Applicable
### Kubernetes Version
Not Applicable
### Helm Chart configuration
Not Applicable
### Docker Image customizations
Not Applicable
### Anything else?
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]