Skip to content

Commit

Permalink
Do not ignore JSON decoding errors when parsing view responses.
Browse files Browse the repository at this point in the history
Change-Id: I755e74bac519e7e39a98fdf1a83611a3b46e3f33
Reviewed-on: http://review.couchbase.org/63118
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
Tested-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information
brett19 committed Apr 20, 2016
1 parent 0c4423f commit f0169a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bucket_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ func (b *Bucket) executeViewQuery(viewType, ddoc, viewName string, options url.V

viewResp := viewResponse{}
jsonDec := json.NewDecoder(resp.Body)
jsonDec.Decode(&viewResp)
err = jsonDec.Decode(&viewResp)
if err != nil {
return nil, err
}

resp.Body.Close()

Expand Down

0 comments on commit f0169a3

Please sign in to comment.