Skip to content

Commit ec8f5ca

Browse files
committed
docs(pkg/api): explain HandleHTTPError does not close resp body
Signed-off-by: Babak K. Shandiz <babakks@github.com>
1 parent 41e1e0d commit ec8f5ca

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pkg/api/errors.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ func matchPath(p, expect string) bool {
9898
}
9999

100100
// HandleHTTPError parses a http.Response into a HTTPError.
101+
//
102+
// The function attempts to read the response's body, but it does not close it.
101103
func HandleHTTPError(resp *http.Response) error {
102104
httpError := &HTTPError{
103105
Headers: resp.Header,

0 commit comments

Comments
 (0)