Skip to content

Commit 1eccb4f

Browse files
Merge pull request #1384 from data-integrations/PLUGIN-1748-cherrypick
[🍒][PLUGIN-1748] Add error message to spanner failure logging
2 parents 079fb78 + 44a9433 commit 1eccb4f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/io/cdap/plugin/gcp/spanner/source/SpannerSource.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
131131
// this is because spanner exception error message is not very user friendly. It contains class names and new
132132
// lines in the error message.
133133
collector.addFailure(String.format(
134-
"Unable to connect to spanner instance with error code: %s", e.getErrorCode().name()),
134+
"Unable to connect to spanner instance with error code: %s and error message: %s",
135+
e.getErrorCode().name(), e.getMessage()),
135136
"Verify spanner configurations such as instance, database, table, project, etc.")
136-
.withStacktrace(e.getStackTrace());
137+
.withStacktrace(e.getStackTrace());
137138
}
138139
}
139140

0 commit comments

Comments
 (0)