Commit fc4387ed authored by Jeromy's avatar Jeromy

add a little bit more verbosity to the error

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent d836d3b6
......@@ -89,7 +89,7 @@ func (n *dagService) Get(ctx context.Context, k key.Key) (*Node, error) {
res, err := DecodeProtobuf(b.Data())
if err != nil {
if strings.Contains(err.Error(), "Unmarshal failed") {
return nil, fmt.Errorf("%s was not a valid merkledag node", k)
return nil, fmt.Errorf("The block referred to by '%s' was not a valid merkledag node", k)
}
return nil, fmt.Errorf("Failed to decode Protocol Buffers: %v", err)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment