This check is only applied to the connection errors (specifically errors 
return from a custom dialer, or from creds handshake).
Errors are non temporary by default. You can make it implement the 
interface and return true.

It has nothing to do with wait-for-ready. And it only applies to the errors 
during the initial Dial, as mentioned in the godoc:
https://pkg.go.dev/google.golang.org/grpc#FailOnNonTempDialError

On Thursday, July 22, 2021 at 1:22:19 AM UTC-7 [email protected] wrote:

> Hi all - is it correct to say that what's considered a transient
> failure (in the context of Wait For Ready semantics [1]) is also
> what's considered a temporary error when using the grpc.WithBlock()
> DialOption?
>
> Also, is there any documentation around what's considered a temporary
> failure and/or transient failure? As of now, the only definitive
> reference seems to be all the error types implementing the Temporary()
> method and the value that it returns.
>
> // internal/transport/http2_client.go
>
> func isTemporary(err error) bool {
> switch err := err.(type) {
> case interface {
> Temporary() bool
> }:
> return err.Temporary()
> case interface {
> Timeout() bool
> }:
> // Timeouts may be resolved upon retry, and are thus treated as
> // temporary.
> return err.Timeout()
> }
> return true
> }
>
> [1] https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/18509bef-b0aa-4815-8927-aa5158c69ae4n%40googlegroups.com.

Reply via email to