starlette-prometheus
starlette-prometheus copied to clipboard
Don't suppress exception chain
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 ?