Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExceptionDictTransformer hides ExceptionGroup sub exceptions #676

Open
brendanmaguire opened this issue Nov 14, 2024 · 0 comments
Open

ExceptionDictTransformer hides ExceptionGroup sub exceptions #676

brendanmaguire opened this issue Nov 14, 2024 · 0 comments

Comments

@brendanmaguire
Copy link

structlog version 24.4.0

The ExceptionDictTransformer hides the underlying ExceptionGroup#exceptions values.

For example, the following ExceptionGroup:

ExceptionGroup("some errors", [ValueError("wrong value"), TypeError("wrong type")])

will be returned as:

[{'exc_type': 'ExceptionGroup', 'exc_value': 'some errors (2 sub-exceptions)', 'syntax_error': None, 'is_cause': False, 'frames': []}]

I would have expected it to recursively iterate through the sub exceptions and add them as a normal top level exception would be transformed.

Maybe I'm missing something here and there is a built in transformer for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant