зеркало из https://github.com/mozilla/mig.git
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:
Родитель
e8eb90a137
Коммит
713688dcf3
|
@ -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)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче