mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Account for GoogleJsonResponseException#getDetails returning null
Apparently, this can happen ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=223163802
This commit is contained in:
parent
c2ee453745
commit
dbdc69916a
5 changed files with 22 additions and 13 deletions
|
@ -676,7 +676,7 @@ public class BigqueryConnection implements AutoCloseable {
|
|||
bigquery.datasets().get(getProjectId(), datasetName).execute();
|
||||
return true;
|
||||
} catch (GoogleJsonResponseException e) {
|
||||
if (e.getDetails().getCode() == 404) {
|
||||
if (e.getDetails() != null && e.getDetails().getCode() == 404) {
|
||||
return false;
|
||||
}
|
||||
throw e;
|
||||
|
@ -689,7 +689,7 @@ public class BigqueryConnection implements AutoCloseable {
|
|||
bigquery.tables().get(getProjectId(), datasetName, tableName).execute();
|
||||
return true;
|
||||
} catch (GoogleJsonResponseException e) {
|
||||
if (e.getDetails().getCode() == 404) {
|
||||
if (e.getDetails() != null && e.getDetails().getCode() == 404) {
|
||||
return false;
|
||||
}
|
||||
throw e;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue