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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20241001-193207.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Catch additional database error exception, NotFound, as a DbtDatabaseError instead
of defaulting to a DbtRuntimeError
time: 2024-10-01T19:32:07.304353-04:00
custom:
Author: mikealfare
Issue: "1360"
4 changes: 4 additions & 0 deletions dbt/adapters/bigquery/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ def exception_handler(self, sql):
message = "Access denied while running query"
self.handle_error(e, message)

except google.cloud.exceptions.NotFound as e:
message = "Not found while running query"
self.handle_error(e, message)

except google.auth.exceptions.RefreshError as e:
message = (
"Unable to generate access token, if you're using "
Expand Down
Loading