wrapping the error in %w

This commit is contained in:
Chan Kang 2022-06-19 15:15:12 -04:00
parent fc45505c46
commit d926999018
1 changed files with 3 additions and 3 deletions

View File

@ -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,
)
}
}