Skip to content

Commit e7e9231

Browse files
bug: log http response bodies in failed daemon calls
1 parent 87863a7 commit e7e9231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/engine/http.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ func (e *Engine) runHTTP(ctx context.Context, prg *types.Program, tool types.Too
9696
defer resp.Body.Close()
9797

9898
if resp.StatusCode > 299 {
99-
_, _ = io.ReadAll(resp.Body)
100-
return nil, fmt.Errorf("error in request to [%s] [%d]: %s", toolURL, resp.StatusCode, resp.Status)
99+
body, _ := io.ReadAll(resp.Body)
100+
return nil, fmt.Errorf("error in request to [%s] [%d]: %s: %s", toolURL, resp.StatusCode, resp.Status, body)
101101
}
102102

103103
content, err := io.ReadAll(resp.Body)

0 commit comments

Comments
 (0)