chamikaramj commented on a change in pull request #17133:
URL: https://github.com/apache/beam/pull/17133#discussion_r831619757



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -1171,9 +1172,10 @@ public void deleteDataset(String projectId, String 
datasetId)
       if (!(e instanceof GoogleJsonResponseException)) {
         return null;
       }
-      GoogleJsonError jsonError = ((GoogleJsonResponseException) 
e).getDetails();
-      GoogleJsonError.ErrorInfo errorInfo = 
Iterables.getFirst(jsonError.getErrors(), null);
-      return errorInfo;
+      return Optional.ofNullable(((GoogleJsonResponseException) 
e).getDetails())

Review comment:
       Can this be covered by a unit test ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to