This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 110110 "ipfs-block" : " ~0.7.1" ,
111111 "ipfs-block-service" : " ~0.14.0" ,
112112 "ipfs-multipart" : " ~0.1.0" ,
113- "ipfs-repo" : " github:ipfs/js-ipfs-repo#fix/node10 " ,
113+ "ipfs-repo" : " ~0.22.0 " ,
114114 "ipfs-unixfs" : " ~0.1.14" ,
115115 "ipfs-unixfs-engine" : " ~0.29.0" ,
116- "ipld" : " github:ipld/js-ipld#fix/node10 " ,
116+ "ipld" : " ~0.17.1 " ,
117117 "ipld-dag-cbor" : " ~0.12.0" ,
118118 "ipld-dag-pb" : " ~0.14.4" ,
119119 "is-ipfs" : " ~0.3.2" ,
Original file line number Diff line number Diff line change 33const waterfall = require ( 'async/waterfall' )
44const series = require ( 'async/series' )
55const extend = require ( 'deep-extend' )
6+ const RepoErrors = require ( 'ipfs-repo/src/errors' )
67
78// Boot an IPFS node depending on the options set
89module . exports = ( self ) => {
@@ -40,7 +41,14 @@ module.exports = (self) => {
4041 // which happens when the version file is not found
4142 // we just want to signal that no repo exist, not
4243 // fail the whole process.
43- // TODO: improve datastore and ipfs-repo implemenations so this error is a bit more unified
44+
45+ // Use standardized errors as much as possible
46+ if ( err . code === RepoErrors . ERR_REPO_NOT_INITIALIZED ) {
47+ return cb ( null , false )
48+ }
49+
50+ // TODO: As error codes continue to be standardized, this logic can be phase out;
51+ // it is here to maintain compatability
4452 if ( err . message . match ( / n o t f o u n d / ) || // indexeddb
4553 err . message . match ( / E N O E N T / ) || // fs
4654 err . message . match ( / N o v a l u e / ) // memory
You can’t perform that action at this time.
0 commit comments