Skip to content

Commit

Permalink
client: add user-friendly error message of LB policy update timed out (
Browse files Browse the repository at this point in the history
  • Loading branch information
holdno authored May 7, 2024
1 parent 9d9c1fb commit 0561c78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion picker_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package grpc

import (
"context"
"fmt"
"io"
"sync"

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

0 comments on commit 0561c78

Please sign in to comment.