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

Catch google NotFound exception as a DbtDatabaseError #1360

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

mikealfare
Copy link
Contributor

Problem

We were not catching a database exception and then returning the result as a runtime exception. This was caught in a test that was recently updated to expect a database exception. The functionality that changed used to not run this code at all, hence it used to pass.

Solution

Add another condition for catching database exceptions.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare self-assigned this Oct 1, 2024
@mikealfare mikealfare requested a review from a team as a code owner October 1, 2024 23:30
@cla-bot cla-bot bot added the cla:yes label Oct 1, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-bigquery contributing guide.

1 similar comment
Copy link
Contributor

github-actions bot commented Oct 1, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-bigquery contributing guide.

@colin-rogers-dbt colin-rogers-dbt enabled auto-merge (squash) October 1, 2024 23:38
@colin-rogers-dbt colin-rogers-dbt merged commit 8833c54 into main Oct 2, 2024
20 checks passed
@colin-rogers-dbt colin-rogers-dbt deleted the fix-pre-hook-test-updates branch October 2, 2024 01:03
github-actions bot pushed a commit that referenced this pull request Oct 2, 2024
* catch google NotFound exception as a DbtDatabaseError

* changelog

(cherry picked from commit 8833c54)
mikealfare added a commit that referenced this pull request Oct 2, 2024
)

* catch google NotFound exception as a DbtDatabaseError

(cherry picked from commit 8833c54)

Co-authored-by: Mike Alfare <13974384+mikealfare@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants