Skip to content

Commit a04e884

Browse files
committed
feat: use new more clearer format in ErrNotFound
1 parent 2e5400e commit a04e884

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

merkledag.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package format
33
import (
44
"context"
55
"errors"
6-
"fmt"
76

87
cid "github.com/ipfs/go-cid"
98
)
@@ -21,10 +20,10 @@ type ErrNotFound struct {
2120
// message for this error.
2221
func (e ErrNotFound) Error() string {
2322
if e.Cid == cid.Undef {
24-
return "node not found"
23+
return "ipld: could not find node"
2524
}
2625

27-
return fmt.Sprintf("%s not found", e.Cid)
26+
return "ipld: could not find " + e.Cid.String()
2827
}
2928

3029
// Is allows to check whether any error is of this ErrNotFound type.

0 commit comments

Comments
 (0)