From 6fda29bcd060917593636cebed9f420751ff1558 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Wed, 10 Oct 2018 12:51:21 -0400 Subject: [PATCH] BigQuery: fix swallowed error message (#6168) --- bigquery/google/cloud/bigquery/dbapi/cursor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bigquery/google/cloud/bigquery/dbapi/cursor.py b/bigquery/google/cloud/bigquery/dbapi/cursor.py index c550287ecc4b..b582860c6045 100644 --- a/bigquery/google/cloud/bigquery/dbapi/cursor.py +++ b/bigquery/google/cloud/bigquery/dbapi/cursor.py @@ -153,8 +153,8 @@ def execute(self, operation, parameters=None, job_id=None): # Wait for the query to finish. try: self._query_job.result() - except google.cloud.exceptions.GoogleCloudError: - raise exceptions.DatabaseError(self._query_job.errors) + except google.cloud.exceptions.GoogleCloudError as exc: + raise exceptions.DatabaseError(exc) query_results = self._query_job._query_results self._set_rowcount(query_results)