-
Notifications
You must be signed in to change notification settings - Fork 143
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
Fix UnboundLocalError when aiohttp server raises a CancelledError #356
Conversation
3244ac9
to
3baf8ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far. Can you please provide a code snippet that causes an UnboundLocalError
to be raised just for reference?
I'm not sure, unfortunately. We have a proxy to some external services, to serve as a cache; such proxy uses aiohttp, and connects to both REST (with httpx) and SOAP (with zeep) services; we recently upgraded from python 3.6 to 3.10 and this error happened once; it's still not clear to me what exactly caused the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged main into this branch and now some CI tests are failing - can you please take a look?
@carolabadeer The tests are failing for a separate issue regarding flask-sqlalchemy. |
Issue #, if available: N/A
Description of changes: In
aiohttp
middleware, catchBaseException
instead ofException
to avoidUnboundLocalError
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.