Skip to content

Commit

Permalink
Merge pull request #44 from ipfs/fix/errors
Browse files Browse the repository at this point in the history
fix: return ErrLinkNotFound when the _link_ isn't found
  • Loading branch information
Stebalien authored Jul 26, 2019
2 parents ea4cf39 + f48088f commit 2442fea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion node.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (n *ProtoNode) RemoveNodeLink(name string) error {
}

if !found {
return ipld.ErrNotFound
return ErrLinkNotFound
}

n.links = ref
Expand Down
2 changes: 1 addition & 1 deletion node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 2442fea

Please sign in to comment.