Skip to content

Commit bf2049d

Browse files
authored
Return status code from any http error (#1090)
1 parent 8b481ed commit bf2049d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: conn_http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ func (h *httpConnect) executeRequest(req *http.Request) (*http.Response, error)
555555
msg, err := h.readRawResponse(resp)
556556

557557
if err != nil {
558-
return nil, errors.Wrap(err, "clickhouse [execute]:: failed to read the response")
558+
return nil, fmt.Errorf("clickhouse [execute]:: %d code: failed to read the response: %w", resp.StatusCode, err)
559559
}
560560

561561
return nil, fmt.Errorf("clickhouse [execute]:: %d code: %s", resp.StatusCode, string(msg))

0 commit comments

Comments
 (0)