Skip to content

Commit 0561c78

Browse files
authored
client: add user-friendly error message of LB policy update timed out (#7206)
1 parent 9d9c1fb commit 0561c78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

picker_wrapper.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package grpc
2020

2121
import (
2222
"context"
23+
"fmt"
2324
"io"
2425
"sync"
2526

@@ -117,7 +118,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
117118
if lastPickErr != nil {
118119
errStr = "latest balancer error: " + lastPickErr.Error()
119120
} else {
120-
errStr = ctx.Err().Error()
121+
errStr = fmt.Sprintf("received context error while waiting for new LB policy update: %s", ctx.Err().Error())
121122
}
122123
switch ctx.Err() {
123124
case context.DeadlineExceeded:

0 commit comments

Comments
 (0)