Skip to content

Commit

Permalink
verbose error message when status code is not ok
Browse files Browse the repository at this point in the history
  • Loading branch information
requiemofthesouls authored and tiaguinho committed Nov 11, 2020
1 parent 05f7515 commit 064bd2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion soap.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (p *process) doRequest(url string) ([]byte, error) {
responseBodyBytes, err := ioutil.ReadAll(resp.Body)

if err != nil {
return nil, err
return nil, fmt.Errorf("Unexpected status code: %d", resp.StatusCode)
}

return nil, fmt.Errorf("Unexpected status code: %d.\nDetail: %s", resp.StatusCode, responseBodyBytes)
Expand Down

0 comments on commit 064bd2c

Please sign in to comment.