Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 8833c54

Browse files
authored
Catch google NotFound exception as a DbtDatabaseError (#1360)
* catch google NotFound exception as a DbtDatabaseError * changelog
1 parent ae0f91c commit 8833c54

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Fixes
2+
body: Catch additional database error exception, NotFound, as a DbtDatabaseError instead
3+
of defaulting to a DbtRuntimeError
4+
time: 2024-10-01T19:32:07.304353-04:00
5+
custom:
6+
Author: mikealfare
7+
Issue: "1360"

dbt/adapters/bigquery/connections.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ def exception_handler(self, sql):
268268
message = "Access denied while running query"
269269
self.handle_error(e, message)
270270

271+
except google.cloud.exceptions.NotFound as e:
272+
message = "Not found while running query"
273+
self.handle_error(e, message)
274+
271275
except google.auth.exceptions.RefreshError as e:
272276
message = (
273277
"Unable to generate access token, if you're using "

0 commit comments

Comments
 (0)