From 4c7d2e4cc8e8b7e929bcf3645a241c298339725d Mon Sep 17 00:00:00 2001 From: jesrypandawa <78069094+jesrypandawa@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:03:59 +0700 Subject: [PATCH] chore: modify error message on stopped error bq sink (#1) * chore: modify error message on stopped error bq sink * chore: fix typo --------- Co-authored-by: jesry.pandawa --- .../depot/bigquery/client/BigQueryResponseParser.java | 2 +- .../java/com/gotocompany/depot/bigquery/error/StoppedError.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gotocompany/depot/bigquery/client/BigQueryResponseParser.java b/src/main/java/com/gotocompany/depot/bigquery/client/BigQueryResponseParser.java index f4308df0..86cc4e8c 100644 --- a/src/main/java/com/gotocompany/depot/bigquery/client/BigQueryResponseParser.java +++ b/src/main/java/com/gotocompany/depot/bigquery/client/BigQueryResponseParser.java @@ -42,7 +42,7 @@ public static Map getErrorsFromBQResponse( Record record = records.get(errorEntry.getKey().intValue()); long messageIndex = record.getIndex(); List errors = ErrorParser.parseError(errorEntry.getValue()); - instrumentation.logError("Error while bigquery insert for message. Record: {}, Error: {}, MetaData: {}", + instrumentation.logError("Error while bigquery insert for message. \nRecord: {}, \nError: {}, \nMetaData: {}", record.getColumns(), errors, record.getMetadata()); if (errorMatch(errors, UnknownError.class)) { diff --git a/src/main/java/com/gotocompany/depot/bigquery/error/StoppedError.java b/src/main/java/com/gotocompany/depot/bigquery/error/StoppedError.java index 9b54adf5..59e2f24f 100644 --- a/src/main/java/com/gotocompany/depot/bigquery/error/StoppedError.java +++ b/src/main/java/com/gotocompany/depot/bigquery/error/StoppedError.java @@ -22,6 +22,6 @@ public boolean matches() { @Override public String toString() { - return "StoppedError: Failed to insert this row because of some (other)error records in batch"; + return "StoppedError: BigQuery encountered an error on individual rows in the request, none of the rows are inserted. This error can be retried"; } }