Skip to content

Commit

Permalink
wrapping the error in %w
Browse files Browse the repository at this point in the history
  • Loading branch information
Chan Kang committed Jun 19, 2022
1 parent 09631a1 commit 0efca0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}
}
Expand Down

0 comments on commit 0efca0d

Please sign in to comment.