Wrap error for good measure

This commit is contained in:
Alexis Sellier 2017-08-09 17:22:16 +02:00
parent ee1a27e6fd
commit 388f0eece7
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ func getWithProof(key []byte, node client.Client, cert certifiers.Certifier) (da
// validate the proof against the certified header to ensure data integrity
err = proof.Verify(resp.Key, check.Header.AppHash)
if err != nil {
return nil, 0, nil, nil, err
return nil, 0, nil, proof, errors.Wrap(err, "Couldn't verify proof")
}
return nil, resp.Height, nil, proof, lc.ErrNoData()