Commit f48088f7 authored by Steven Allen's avatar Steven Allen

fix: return ErrLinkNotFound when the _link_ isn't found

ipld.ErrNotFound should only be used when the underlying node isn't found
parent ea4cf399
......@@ -138,7 +138,7 @@ func (n *ProtoNode) RemoveNodeLink(name string) error {
}
if !found {
return ipld.ErrNotFound
return ErrLinkNotFound
}
n.links = ref
......
......@@ -59,7 +59,7 @@ func TestRemoveLink(t *testing.T) {
// should fail
err = nd.RemoveNodeLink("a")
if err != ipld.ErrNotFound {
if err != ErrLinkNotFound {
t.Fatal("should have failed to remove link")
}
......
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