From 464f255e78071e94d870319757e104ebbf39339b Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sun, 12 Jun 2022 00:34:21 -0400 Subject: [PATCH] include the likely cause of the error in the error message --- client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 3be04aa..b51cfd9 100644 --- a/client.go +++ b/client.go @@ -188,7 +188,11 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h for _, proto := range d.TLSClientConfig.NextProtos { if proto != "http/1.1" { - return nil, nil, fmt.Errorf("protocol %q is currently not supported", proto) + return nil, nil, fmt.Errorf( + `protocol %q was given but is not supported; + sharing tls.Config with net/http Transport can cause this error`, + proto, + ) } }