From d926999018d79949fca2047104472903c4b77c28 Mon Sep 17 00:00:00 2001 From: Chan Kang Date: Sun, 19 Jun 2022 15:15:12 -0400 Subject: [PATCH] wrapping the error in %w --- client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index c5c3db0..f79ac98 100644 --- a/client.go +++ b/client.go @@ -375,9 +375,9 @@ 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( - "websocket: protocol %q was given but is not supported; "+ - "sharing tls.Config with net/http Transport can cause this error", - proto, + "websocket: protocol %q was given but is not supported;"+ + "sharing tls.Config with net/http Transport can cause this error: %w", + proto, err, ) } }