This is an automated email from the ASF dual-hosted git repository.

johncasey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d6f9f16dc6 Improve exception when requested error tag does not exist 
(#22401) (#22405)
5d6f9f16dc6 is described below

commit 5d6f9f16dc669c859898c1619071b2b427b1ca22
Author: Bruno Volpato <brunocvcu...@gmail.com>
AuthorDate: Wed Aug 10 09:51:18 2022 -0400

    Improve exception when requested error tag does not exist (#22401) (#22405)
---
 .../java/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.java     | 8 ++++----
 .../org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOWriteTest.java  | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.java
 
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.java
index 574f8549eca..d18dabfc8ea 100644
--- 
a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.java
+++ 
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteResult.java
@@ -169,11 +169,11 @@ public final class WriteResult implements POutput {
     Preconditions.checkArgumentNotNull(
         failedInsertsTag,
         "Cannot use getFailedInserts as this WriteResult uses extended errors"
-            + " information. Use getFailedInsertsWithErr instead");
+            + " information. Use getFailedInsertsWithErr or 
getFailedStorageApiInserts instead");
     return Preconditions.checkStateNotNull(
         failedInserts,
         "Cannot use getFailedInserts as this WriteResult uses extended errors"
-            + " information. Use getFailedInsertsWithErr instead");
+            + " information. Use getFailedInsertsWithErr or 
getFailedStorageApiInserts instead");
   }
 
   /**
@@ -187,11 +187,11 @@ public final class WriteResult implements POutput {
     Preconditions.checkArgumentNotNull(
         failedInsertsWithErrTag,
         "Cannot use getFailedInsertsWithErr as this WriteResult does not use"
-            + " extended errors. Use getFailedInserts instead");
+            + " extended errors. Use getFailedInserts or 
getFailedStorageApiInserts instead");
     return Preconditions.checkArgumentNotNull(
         failedInsertsWithErr,
         "Cannot use getFailedInsertsWithErr as this WriteResult does not use"
-            + " extended errors. Use getFailedInserts instead");
+            + " extended errors. Use getFailedInserts or 
getFailedStorageApiInserts instead");
   }
 
   public PCollection<BigQueryStorageApiInsertError> 
getFailedStorageApiInserts() {
diff --git 
a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOWriteTest.java
 
b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOWriteTest.java
index 1bf78ed70d8..8c8a93a40e5 100644
--- 
a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOWriteTest.java
+++ 
b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIOWriteTest.java
@@ -2610,7 +2610,7 @@ public class BigQueryIOWriteTest implements Serializable {
           e.getMessage(),
           is(
               "Cannot use getFailedInsertsWithErr as this WriteResult "
-                  + "does not use extended errors. Use getFailedInserts 
instead"));
+                  + "does not use extended errors. Use getFailedInserts or 
getFailedStorageApiInserts instead"));
     }
 
     try {
@@ -2623,7 +2623,7 @@ public class BigQueryIOWriteTest implements Serializable {
           e.getMessage(),
           is(
               "Cannot use getFailedInserts as this WriteResult "
-                  + "uses extended errors information. Use 
getFailedInsertsWithErr instead"));
+                  + "uses extended errors information. Use 
getFailedInsertsWithErr or getFailedStorageApiInserts instead"));
     }
 
     try {

Reply via email to