Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Commit 12ecf51

Browse files
committed
chore: return an error object instead of a string
1 parent c2e38ae commit 12ecf51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/exporter/object.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ module.exports = (cid, node, name, path, pathRest, resolve, size, dag, parent, d
1010
newNode = node[pathElem]
1111
const newName = path + '/' + pathElem
1212
if (!newNode) {
13-
return pull.error('not found')
13+
return pull.error(new Error(`not found`))
1414
}
15+
1516
const isCID = CID.isCID(newNode)
17+
1618
return pull(
1719
pull.values([{
1820
depth: depth,

0 commit comments

Comments
 (0)