mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/proxy: log response body on non-200 response code
This should improve debuggability for https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1179
This commit is contained in:
parent
2256b79a89
commit
43f9842b6f
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ func sendConnectRequest(proxyConn net.Conn, proxyAddr, dstAddr, authHeader strin
|
|||
return nil, fmt.Errorf("cannot read CONNECT response for dstAddr=%q: %w", dstAddr, err)
|
||||
}
|
||||
if statusCode := res.Header.StatusCode(); statusCode != 200 {
|
||||
return nil, fmt.Errorf("unexpected status code received: %d; want: 200", statusCode)
|
||||
return nil, fmt.Errorf("unexpected status code received: %d; want: 200; response body: %q", statusCode, res.Body())
|
||||
}
|
||||
return conn, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue