Skip to content

Commit

Permalink
Merge pull request data-integrations#1378 from data-integrations/impr…
Browse files Browse the repository at this point in the history
…ove-spanner-logging

[PLUGIN-1748] Add error code to spanner failure logging
  • Loading branch information
itsankit-google authored Feb 15, 2024
2 parents 42f75fd + 716449d commit 008f3a8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ public void configurePipeline(PipelineConfigurer pipelineConfigurer) {
} catch (SpannerException e) {
// this is because spanner exception error message is not very user friendly. It contains class names and new
// lines in the error message.
collector.addFailure("Unable to connect to spanner instance.",
"Verify spanner configurations such as instance, database, table, project, etc.")
collector.addFailure(String.format(
"Unable to connect to spanner instance with error code: %s", e.getErrorCode().name()),
"Verify spanner configurations such as instance, database, table, project, etc.")
.withStacktrace(e.getStackTrace());
}
}
Expand Down

0 comments on commit 008f3a8

Please sign in to comment.