Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 2b55c32

Browse files
Merge branch 'main' into jdbc/feat-strict-url-parse-and-sync-dataSource
2 parents 6709e7e + 4e0b409 commit 2b55c32

4 files changed

Lines changed: 12 additions & 22 deletions

File tree

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# For syntax help see:
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66

7-
# The @googleapis/api-bigquery is the default owner for changes in this repo
8-
* @googleapis/cloud-sdk-java-team @googleapis/api-bigquery
7+
# The @googleapis/bigquery-team is the default owner for changes in this repo
8+
* @googleapis/cloud-sdk-java-team @googleapis/bigquery-team
99

1010
# The java-samples-reviewers team is the default owner for samples changes
1111
samples/**/*.java @googleapis/cloud-sdk-java-team @googleapis/java-samples-reviewers

.github/sync-repo-settings.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ branchProtectionRules:
163163
- javadoc
164164
- unmanaged_dependency_check
165165
permissionRules:
166-
- team: api-bigquery
166+
- team: bigquery-team
167167
permission: admin
168-
- team: yoshi-java
168+
- team: cloud-sdk-java-team
169169
permission: push
170170
- team: yoshi-admins
171171
permission: admin

.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"repo": "googleapis/java-bigquery",
1111
"repo_short": "java-bigquery",
1212
"distribution_name": "com.google.cloud:google-cloud-bigquery",
13-
"codeowner_team": "@googleapis/api-bigquery",
13+
"codeowner_team": "@googleapis/bigquery-team",
1414
"api_id": "bigquery.googleapis.com",
1515
"library_type": "GAPIC_MANUAL",
1616
"requires_billing": true,

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryRetryAlgorithm.java

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import com.google.api.gax.retrying.TimedAttemptSettings;
2626
import com.google.api.gax.retrying.TimedRetryAlgorithm;
2727
import com.google.api.gax.retrying.TimedRetryAlgorithmWithContext;
28-
import com.google.gson.JsonObject;
29-
import com.google.gson.JsonParser;
28+
import com.google.api.services.bigquery.model.ErrorProto;
29+
import com.google.api.services.bigquery.model.Job;
3030
import java.time.Duration;
3131
import java.util.Iterator;
3232
import java.util.UUID;
@@ -222,21 +222,11 @@ private String getErrorDescFromResponse(ResponseT previousResponse) {
222222
following logic based on response body of jobs.insert method, so far the only
223223
known case where a response with status code 200 may contain an error message
224224
*/
225-
try {
226-
JsonObject responseJson =
227-
JsonParser.parseString(previousResponse.toString()).getAsJsonObject();
228-
if (responseJson.has("status") && responseJson.getAsJsonObject("status").has("errorResult")) {
229-
return responseJson
230-
.getAsJsonObject("status")
231-
.getAsJsonObject("errorResult")
232-
.get("message")
233-
.toString();
234-
} else {
235-
return null;
236-
}
237-
} catch (Exception e) {
238-
// exceptions here implies no error message present in response, returning null
239-
return null;
225+
if (previousResponse instanceof Job) {
226+
Job job = (Job) previousResponse;
227+
ErrorProto error = job.getStatus() != null ? job.getStatus().getErrorResult() : null;
228+
return error != null ? error.getMessage() : null;
240229
}
230+
return null;
241231
}
242232
}

0 commit comments

Comments
 (0)