diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 5ef216c466..048d732f94 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -9,6 +9,7 @@ #### General - \#2216 Fix Accept Multiline message on Windows (@leszko) +- \#2218 Display http status codes in livepeer_cli (@noisersup) #### Broadcaster diff --git a/cmd/livepeer_cli/wizard_rounds.go b/cmd/livepeer_cli/wizard_rounds.go index 8f0e9c6f31..a0ee9a1c68 100644 --- a/cmd/livepeer_cli/wizard_rounds.go +++ b/cmd/livepeer_cli/wizard_rounds.go @@ -17,7 +17,7 @@ func (w *wizard) currentRound() (*big.Int, error) { defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - return nil, errors.New("http response status not ok") + return nil, errors.New(fmt.Sprintf("http response status %d", resp.StatusCode)) } body, err := ioutil.ReadAll(resp.Body) diff --git a/cmd/livepeer_cli/wizard_stats.go b/cmd/livepeer_cli/wizard_stats.go index 532900bf0e..350425a8a6 100644 --- a/cmd/livepeer_cli/wizard_stats.go +++ b/cmd/livepeer_cli/wizard_stats.go @@ -450,7 +450,7 @@ func (w *wizard) currentBlock() (*big.Int, error) { defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - return nil, errors.New("http response status not ok") + return nil, errors.New(fmt.Sprintf("http response status %d", resp.StatusCode)) } body, err := ioutil.ReadAll(resp.Body)