From 2144359ff7e34be563a108e8cd0b72ec6f8e8757 Mon Sep 17 00:00:00 2001 From: billettc Date: Thu, 13 Dec 2018 08:36:42 -0500 Subject: [PATCH] unfix the fix -> the condition prevent the error message from nodes to be propagated there was not issue here! --- api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.go b/api.go index b9afe3f0..739c3fc2 100644 --- a/api.go +++ b/api.go @@ -580,7 +580,7 @@ func (api *API) call(baseAPI string, endpoint string, body interface{}, out inte } if resp.StatusCode > 299 { var apiErr APIError - if err := json.Unmarshal(cnt.Bytes(), &apiErr); err == nil { + if err := json.Unmarshal(cnt.Bytes(), &apiErr); err != nil { return fmt.Errorf("%s: status code=%d, body=%s", req.URL.String(), resp.StatusCode, cnt.String()) } return apiErr