-
Notifications
You must be signed in to change notification settings - Fork 503
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
Issue with _set_db_data when using psycopg3 #3061
Comments
@austin-wentz Thank you for reporting this problem, and thanks for the detailed reproduction! I can confirm that I have also observed the same error, so we will try to get a fix ready soon. Has what you are trying to do ever worked in a previous SDK version, and if so, which version? Also, have you been able to work around the issue? |
Sorry for the delay in response. We tried previous SDK versions, but the issue was still present. Yes, we were able to work around the issue by creating a new connection rather than trying to [re]connect the existing connection object. |
Thanks for the additional information. We will have a fix soon. |
Related to #2427 |
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.1.1
Steps to Reproduce
I created a sample repo that reproduces the bug.
From what I can tell, the issue is that the call to get_parameters() tries to access pgconn.info, but that will throw an operational error if the connection is already closed.
A suggested fix would be something like
Expected Result
The expected result is for the sentry-sdk to not try and access a bad connection in _set_db_data
Actual Result
The actual result is that the call to get_parameters() results in a psycopg.OperationalError:
The text was updated successfully, but these errors were encountered: