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

Don't suppress exception chain #51

Open
JoseKilo opened this issue May 20, 2024 · 0 comments · May be fixed by #52
Open

Don't suppress exception chain #51

JoseKilo opened this issue May 20, 2024 · 0 comments · May be fixed by #52

Comments

@JoseKilo
Copy link

This line from the middleware makes sure that exceptions are re-raised after counting them:

https://github.com/perdy/starlette-prometheus/blob/master/starlette_prometheus/middleware.py#L57

But the from None part is removing any existing chain from the original exception.

This is really unexpected, since the logging behaviour changes after adding the middleware.

I don't see a reason to suppress the chain, was there a reason at some point ?

@JoseKilo JoseKilo changed the title Don't supress exception chain Don't suppress exception chain May 20, 2024
@JoseKilo JoseKilo linked a pull request May 20, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant