Skip to content

Commit cff9fb7

Browse files
ryanmatsJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Changed error handling for all other big query samples as well [(googleapis#694)](GoogleCloudPlatform/python-docs-samples#694)
1 parent 3d3475c commit cff9fb7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

samples/snippets/async_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def wait_for_job(job):
3535
job.reload() # Refreshes the state via a GET request.
3636
if job.state == 'DONE':
3737
if job.error_result:
38-
raise RuntimeError(job.error_result)
38+
raise RuntimeError(job.errors)
3939
return
4040
time.sleep(1)
4141

samples/snippets/export_data_to_gcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def wait_for_job(job):
5454
job.reload()
5555
if job.state == 'DONE':
5656
if job.error_result:
57-
raise RuntimeError(job.error_result)
57+
raise RuntimeError(job.errors)
5858
return
5959
time.sleep(1)
6060

samples/snippets/load_data_from_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def wait_for_job(job):
5656
job.reload()
5757
if job.state == 'DONE':
5858
if job.error_result:
59-
raise RuntimeError(job.error_result)
59+
raise RuntimeError(job.errors)
6060
return
6161
time.sleep(1)
6262

samples/snippets/snippets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def wait_for_job(job):
180180
job.reload() # Refreshes the state via a GET request.
181181
if job.state == 'DONE':
182182
if job.error_result:
183-
raise RuntimeError(job.error_result)
183+
raise RuntimeError(job.errors)
184184
return
185185
time.sleep(1)
186186

0 commit comments

Comments
 (0)