You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2021. It is now read-only.
While using ipfs.dag.get() for a list of CIDs, encountered the below errors on some of them:
Error: invalid base16 character
at Object.decode ( node_modules\multibase\src\base16.js:14:17)
at Base.decode ( node_modules\multibase\src\base.js:18:24)
at Function.decode ( node_modules\multibase\src\index.js:75:27)
at new CID ( node_modules\cids\src\index.js:79:31)
at new CID ( node_modules\class-is\index.js:15:17)
at Function.get.promisify ( node_modules\ipfs\src\core\components\dag.js:94:17)
at Object.get ( node_modules\promisify-es6\index.js:32:27)
The error is fine, except it is very difficult to identify which exact CID was causing this error (when dealing with multiple CIDs, across multiple asynchronous calls).
Wondering if you would be open to make the errors much descriptive, something like below: at line 14 of base16.js
for (let char of input) {
if (alphabet.indexOf(char) < 0) {
throw new Error(`invalid base16 character '${char}' in '${input}'`) //<- more descriptive
}
}
This helps the callers / users troubleshoot the problems more easily.