Skip to content

Commit 0c1eae8

Browse files
committed
Fixed error wrapping
1 parent 8101054 commit 0c1eae8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chained/dialer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func (p *proxy) buildCONNECTRequest(addr string) (*http.Request, error) {
248248
func (p *proxy) checkCONNECTResponse(op *ops.Op, r *bufio.Reader, req *http.Request, reqTime time.Time) error {
249249
resp, err := http.ReadResponse(r, req)
250250
if err != nil {
251-
return errors.New("Error reading CONNECT response: %s", err)
251+
return fmt.Errorf("Error reading CONNECT response: %w", err)
252252
}
253253
if !sameStatusCodeClass(http.StatusOK, resp.StatusCode) {
254254
var body []byte

0 commit comments

Comments
 (0)