Skip to content

Commit

Permalink
Merge branch 'main' into add-columns-alias
Browse files Browse the repository at this point in the history
  • Loading branch information
chalmerlowe authored Nov 28, 2023
2 parents fa83832 + d921106 commit c26d2fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pandas_gbq/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,15 @@ def run_query(self, query, max_results=None, progress_bar_type=None, **kwargs):
project=self.project_id,
)
logger.debug("Query running...")
except (RefreshError, ValueError):
except (RefreshError, ValueError) as ex:
if self.private_key:
raise AccessDenied("The service account credentials are not valid")
raise AccessDenied(
f"The service account credentials are not valid: {ex}"
)
else:
raise AccessDenied(
"The credentials have been revoked or expired, "
"please re-run the application to re-authorize"
f"please re-run the application to re-authorize: {ex}"
)
except self.http_error as ex:
self.process_http_error(ex)
Expand Down

0 comments on commit c26d2fe

Please sign in to comment.