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

Pyramid tween only handles HTTPException #888

Closed
gregbuehler opened this issue Jan 31, 2022 · 1 comment · Fixed by #1001
Closed

Pyramid tween only handles HTTPException #888

gregbuehler opened this issue Jan 31, 2022 · 1 comment · Fixed by #1001
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@gregbuehler
Copy link
Contributor

Describe your environment
Seeing this exhibited in Pyramid 1.10 and as far back as Pyramid 1.7.

Steps to reproduce
Raise a non-HTTPException.

What is the expected behavior?
Tweens should process normally.

What is the actual behavior?
An error for use of response_or_exception before assignment is raised.

Additional context
The problem exists here https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py#L146-L157. It seems there should be an additional exception case for BaseException to initialize response_or_exception.

@gregbuehler gregbuehler added the bug Something isn't working label Jan 31, 2022
@owais owais added the help wanted Extra attention is needed label Feb 1, 2022
@owais
Copy link
Contributor

owais commented Feb 1, 2022

Proposed fix makes sense. PRs welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants