Skip to content

Commit

Permalink
cmd: Display http status codes in livepeer_cli
Browse files Browse the repository at this point in the history
  • Loading branch information
noisersup authored Jan 31, 2022
1 parent c6563c7 commit 09321bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- \#2212 y/n confirmation when sending a transaction via the CLI (@noisersup)

- \#2216 Fix Accept Multiline message on Windows (@leszko)
- \#2218 Display http status codes in livepeer_cli (@noisersup)

#### Broadcaster

Expand Down
2 changes: 1 addition & 1 deletion cmd/livepeer_cli/wizard_rounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/livepeer_cli/wizard_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 09321bf

Please sign in to comment.