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

Fix: Change DatabaseException to DbtDatabaseError #205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kennycontreras
Copy link

Describe your changes

Since dbt-code 1.4.0 and above, the exception DatabaseException changed to DbtDatabaseError.

This leads to errors like module dbt.exceptions has no attribute DatabaseException when an actual Database Error happens.

Screenshot 2024-09-28 at 10 54 26

dbt-core source code > 1.7.0: https://github.com/dbt-labs/dbt-core/blob/v1.7.0/core/dbt/exceptions.py#L187
dbt-core source code > 1.3.7: https://github.com/dbt-labs/dbt-core/blob/v1.3.7/core/dbt/exceptions.py#L198

Internal Jira ticket number or external issue link

Testing procedure/screenshots(if appropriate):

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have formatted my added/modified code to follow pep-8 standards
  • I have checked suggestions from python linter to make sure code is of good quality.

@niranjancdw
Copy link
Collaborator

niranjancdw commented Oct 1, 2024

Hi @kennycontreras
Thanks for pushing this fix, we'll take a look.

@kennycontreras
Copy link
Author

Hi @kennycontreras Thanks for pushing this fix, we'll take a look.

Thanks! Please let me know if anything else is needed 🙇🏻‍♂️

@niranjancdw
Copy link
Collaborator

Hi @kennycontreras
Thanks for following up. I checked your changes and I've created a new PR with additional changes and a test. In general along with any fix it'd be good to run the tests as well as adding a new test wherever applicable 😄 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants