Skip to content

Commit 7f42a69

Browse files
committed
refactor: log ws1 api error responses
1 parent 3c0d12c commit 7f42a69

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/ws1/extractor.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ func doAuthRequest(user, pass, apiKey, url, method string, payload interface{})
6363
}
6464

6565
if resp.StatusCode > 399 {
66+
respB, _ := ioutil.ReadAll(resp.Body)
67+
logrus.WithField("response", string(respB)).Warn("invalid response")
6668
return nil, errors.New("invalid response code: " + strconv.Itoa(resp.StatusCode))
6769
}
6870

0 commit comments

Comments
 (0)