Update api.go

Co-authored-by: Travis Turner <travis@pilosa.com>
This commit is contained in:
Kuba Podgórski 2020-05-15 19:39:36 +02:00 committed by GitHub
parent f40601f6f5
commit ea08cce8fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
api.go
View file

@ -159,7 +159,7 @@ func (api *API) Query(ctx context.Context, req *QueryRequest) (QueryResponse, er
return QueryResponse{}, errors.Wrap(err, "executing")
}
// The most important is to ensure that resp.Err isn't being swallowed
// Check for an error embedded in the response.
if resp.Err != nil {
err = errors.Wrap(resp.Err, "executing")
}