Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: nullpointer exception when executionerror is null (#754)
  • Loading branch information
Praful Makani committed Sep 24, 2020
1 parent 7258ada commit 03bda1b
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -297,8 +297,10 @@ public TableResult getQueryResults(QueryResultsOption... options)
job = reload();
}
if (job.getStatus() != null && job.getStatus().getError() != null) {
throw new JobException(
getJobId(), ImmutableList.copyOf(job.getStatus().getExecutionErrors()));
throw new BigQueryException(
job.getStatus().getExecutionErrors() == null
? ImmutableList.of(job.getStatus().getError())
: ImmutableList.copyOf(job.getStatus().getExecutionErrors()));
}

// If there are no rows in the result, this may have been a DDL query.
Expand Down

0 comments on commit 03bda1b

Please sign in to comment.