Skip to content

Commit b267295

Browse files
authored
Merge pull request #777 from ydb-platform/discovery-fail-details
Added details to error from initial discovery
2 parents 8e2d8e5 + b9dbc1e commit b267295

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

internal/balancer/balancer.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,15 @@ func (b *Balancer) clusterDiscovery(ctx context.Context) (err error) {
6666
if err = retry.Retry(ctx, func(childCtx context.Context) (err error) {
6767
if err = b.clusterDiscoveryAttempt(childCtx); err != nil {
6868
if xerrors.IsTransportError(err, grpcCodes.Unauthenticated) {
69-
return xerrors.WithStackTrace(err)
69+
return xerrors.WithStackTrace(
70+
fmt.Errorf(
71+
"cluster discovery failed: %w (endpoint: %q, database: %q, credentials: %q)",
72+
err,
73+
b.driverConfig.Endpoint(),
74+
b.driverConfig.Database(),
75+
b.driverConfig.Credentials(),
76+
),
77+
)
7078
}
7179
// if got err but parent context is not done - mark error as retryable
7280
if ctx.Err() == nil && xerrors.IsTimeoutError(err) {

0 commit comments

Comments
 (0)