Skip to content

Commit

Permalink
[AIRFLOW-712] Fix AIRFLOW-667 to use proper HTTP error properties
Browse files Browse the repository at this point in the history
Closes apache#1955 from criccomini/AIRFLOW-712
  • Loading branch information
criccomini authored and alexvanboxel committed Dec 22, 2016
1 parent 062354d commit edf55cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions airflow/contrib/hooks/bigquery_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,12 @@ def run_with_configuration(self, configuration):
time.sleep(5)

except HttpError as err:
if err.code in [500, 503]:
logging.info('%s: Retryable error, waiting for job to complete: %s', err.code, job_id)
if err.resp.status in [500, 503]:
logging.info('%s: Retryable error, waiting for job to complete: %s', err.resp.status, job_id)
time.sleep(5)
else:
raise Exception(
'BigQuery job status check faild. Final error was: %s', err.code)
'BigQuery job status check failed. Final error was: %s', err.resp.status)

return job_id

Expand Down

0 comments on commit edf55cd

Please sign in to comment.