Skip to content

Commit 9842f64

Browse files
authored
fix: bigquery job statistics for rate limit (#4272)
1 parent c1758a6 commit 9842f64

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

warehouse/integrations/bigquery/bigquery.go

+5
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,11 @@ func (bq *BigQuery) jobStatistics(
466466
)
467467
bqJob, err := bqJobGetCall.Context(ctx).Location(job.Location()).Fields("statistics").Do()
468468
if err != nil {
469+
// In case of rate limit error, return empty statistics
470+
var e *googleapi.Error
471+
if errors.As(err, &e) && e.Code == 429 {
472+
return &bqService.JobStatistics{}, nil
473+
}
469474
return nil, fmt.Errorf("getting job: %w", err)
470475
}
471476
return bqJob.Statistics, nil

0 commit comments

Comments
 (0)