From aa49572462247f898c7f6244f6be0ca4a058f88a Mon Sep 17 00:00:00 2001 From: r--w Date: Fri, 2 Oct 2015 14:20:57 +0200 Subject: [PATCH] Fixing IndicesExist function --- goes.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/goes.go b/goes.go index f15000f..3781cff 100644 --- a/goes.go +++ b/goes.go @@ -358,11 +358,9 @@ func (req *Request) Run() (*Response, error) { return esResp, err } json.Unmarshal(body, &esResp.Raw) - } - - err = json.Unmarshal(body, &esResp) - if err != nil { - return &Response{Status: statusCode}, err + if err != nil { + return &Response{Status: statusCode}, err + } } if req.api == "_bulk" && esResp.Errors {