Skip to content

Commit

Permalink
Fix logs download (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidCheckmarx authored Nov 22, 2020
1 parent ee46246 commit 54b7bdf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/wrappers/logs-http.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ func (l *LogsHTTPWrapper) GetURL() (io.ReadCloser, *helpers.WebError, error) {
}

downloadResp, err := SendHTTPRequestByFullURL(http.MethodGet, model.URL, nil,
false, DefaultTimeoutSeconds)
true, DownloadLogsTimeoutSeconds)
if err != nil {
return nil, nil, err
}

if downloadResp.StatusCode != http.StatusOK {
defer downloadResp.Body.Close()
return nil, nil, errors.Errorf("response status code %d", downloadResp.StatusCode)
return nil, nil, errors.Errorf("downloading logs after retrieving url got response status code %d",
downloadResp.StatusCode)
}

return downloadResp.Body, nil, nil
Expand Down

0 comments on commit 54b7bdf

Please sign in to comment.