Skip to content

Commit 2442fea

Browse files
authored
Merge pull request ipfs#44 from ipfs/fix/errors
fix: return ErrLinkNotFound when the _link_ isn't found
2 parents ea4cf39 + f48088f commit 2442fea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (n *ProtoNode) RemoveNodeLink(name string) error {
138138
}
139139

140140
if !found {
141-
return ipld.ErrNotFound
141+
return ErrLinkNotFound
142142
}
143143

144144
n.links = ref

node_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestRemoveLink(t *testing.T) {
5959

6060
// should fail
6161
err = nd.RemoveNodeLink("a")
62-
if err != ipld.ErrNotFound {
62+
if err != ErrLinkNotFound {
6363
t.Fatal("should have failed to remove link")
6464
}
6565

0 commit comments

Comments
 (0)