Explicit Exception chaining focuses on outer Exception
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 624
Description
If I explicitly chain 2 exceptions:
```python
try:
if not my_var:
raise Exception('Incorrect data')
if not parsed_data:
raise Exception('Parsing failed')
except Exception as e:
raise Exception('Failed to convert file') from e
```
The outer exception (in this case: 'Failed to convert file') gets the focus in the Sentry issue (e.g. it decides the title). This is imo incorrect behavior since if issues are grouped by stack trace, you will now have 2 issues with the same title but with different underlying exceptions.
I think the title of the issue should be decided from the innermost exception.
This might be related to getsentry/sentry-python#243.
Contributor guide
Assessment
This issue has not been assessed yet.