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
Improve connection exception by including underlying driver exception trace #3033
Conversation
When there is an unexpected exception while connecting to the database, liquibase should populate the "causedBy" exception so that it is possible to troubleshoot connection problems. Without this, users are shooting in the dark if the connection fails.
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.
Makes sense. I think the "caused by" must have gotten missed there, there should be no reason to suppress that.
@StevenMassaro thanks for the quick review. Would you mind adding the tag |
Thanks for the reminder on the label. I added it |
Reproduced this PR on MySQL and looks like it works as excpected and showing the right complete stack trace Test Environment |
Impact
Description
When there is an unexpected exception while connecting to the database, liquibase should populate the "causedBy"
exception so that it is possible to troubleshoot connection problems. Without this, users are shooting
in the dark if the connection fails.
Things to worry about
Additional Context
I'm submitting this PR because of problems that my customers have using liquibase with
google cloud sql. Often the problems are related to configuration issues that prevent them
from connecting and are easily resolved. The configuration problems are explained in exception
messages thrown by the custom google cloud sql socket factory.
However, when my customers Liquibase, these messages are hidden. It would be helpful
to let them see the full stack trace.