mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
check for slightly fewer errors
json.Decoder.Decode() can yield io.EOF which is not actually an error. This appears to have caused a number of indirect test failures by making ImportRoaring generally report failure.
This commit is contained in:
parent
d5907b2a2e
commit
2c6eb66895
1 changed files with 2 additions and 1 deletions
|
|
@ -630,7 +630,8 @@ func (c *InternalClient) ImportRoaring(ctx context.Context, uri *pilosa.URI, ind
|
|||
dec := json.NewDecoder(resp.Body)
|
||||
rbody := &pilosa.ImportResponse{}
|
||||
err = dec.Decode(rbody)
|
||||
if err != nil {
|
||||
// Decode can return EOF when no error occurred. helpful!
|
||||
if err != nil && err != io.EOF {
|
||||
return errors.Wrap(err, "decoding response body")
|
||||
}
|
||||
if rbody.Err != "" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue