Skip to content
Open
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
13 changes: 12 additions & 1 deletion datastore/infrastructure/engines/bigquery/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,18 @@ def _read_schema(self, resource_id: str) -> dict | None:
ref = f"{self.config.BIGQUERY_PROJECT}.{self.config.BIGQUERY_DATASET}.{resource_id}"
try:
table = self.client.get_table(ref)
except NotFound:
except NotFound as e:
# Google's tables.get 404 can mean "genuinely absent" or a
# masked authorization failure (some GCP APIs report 404
# instead of 403 to avoid leaking existence). Log the raw
# response so an unexpected NotFound is diagnosable instead
# of silently indistinguishable from a real missing table.
log.debug(
"BigQuery tables.get NotFound for resource %r (ref=%r): %s",
resource_id,
ref,
e,
)
return None
except Exception as e:
raise ServerError(
Expand Down
Loading