hyperium / tonic

A native gRPC client & server implementation with async/await support.
https://docs.rs/tonic
MIT License
9.71k stars 992 forks source link

Non-descriptive error messages on connection failure #1608

Open efagerho opened 7 months ago

efagerho commented 7 months ago

Tonic currently returns "transport error" when DNS queries fail. This can happen for instance when a DNS resolver is overloaded in a Kubernetes cluster or the VPC DNS resolver throttles on AWS.

It would be extremely helpful if the library could distinguish between DNS errors, TCP connection error and HTTP/2 connection error.

LucioFranco commented 7 months ago

The error messages in transport are unfortunately not totally complete in this way. This was due to a few reasons, mostly, being that I didn't want the current code to last this long but I guess sometimes you don't have much choice in that 😄. Agreed, this should be fixed.