Go - Getting the error in Dial/DialContext() when using WithBlock()

282 views
Skip to first unread message

Amit Saha

unread,
Jul 21, 2021, 6:59:13 PM7/21/21
to grpc.io
When using the Go grpc library, in the client, when WithBlock(), I can
use GO_GRPC_LOG_xx variables to see the client connection logs.
However in my application code, the real underlying reason for which
the connection attempt is being retried is not visible. Is that a
reasonable expectation to have - i can create a RFE for that if so.

Thanks,
Amit.

Amit Saha

unread,
Jul 21, 2021, 7:05:31 PM7/21/21
to grpc.io
Just after posting this, i realized that i can use the
grpc.FailOnNonTempDialError(true), DialOption to get the error and
since it's a non-temporary error this is the case where i would really
care about the error.

I also found https://github.com/grpc/grpc-go/issues/2031#issuecomment-387545938
which is relevant.

Amit Saha

unread,
Jul 21, 2021, 7:06:55 PM7/21/21
to grpc.io
And: https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError
- exactly what i am looking for i think.
Reply all
Reply to author
Forward
0 new messages