We had two error handlers for checking if a request to the MIG API failed but were losing information in the first case, so I removed it

This commit is contained in:
Zack Mullaly 2018-07-16 13:00:01 -04:00
Родитель e8eb90a137
Коммит 713688dcf3
1 изменённых файлов: 0 добавлений и 3 удалений

Просмотреть файл

@ -364,9 +364,6 @@ func (cli Client) Do(r *http.Request) (resp *http.Response, err error) {
} }
// execute the request // execute the request
resp, err = cli.API.Do(r) resp, err = cli.API.Do(r)
if resp == nil {
panic("failed to contact the API")
}
if err != nil { if err != nil {
msg := fmt.Errorf("request failed error: %d %s (%v)", resp.StatusCode, resp.Status, err) msg := fmt.Errorf("request failed error: %d %s (%v)", resp.StatusCode, resp.Status, err)
panic(msg) panic(msg)