brig
brig copied to clipboard
Improve error handling during network commands
trafficstars
A few points noticed:
- During the initial connect (e.g. after startup) many different errors might happen until IPFS seems to find a suitable connection.
- When one site is authenticated, but not the other
auth: EOFis shown as not very helpful error. brig remote lsdoes not seem to work when only one remote is erroring out.- When a node is offline we should timeout after some time. Timeout duration should be configurable.
Just two other things:
brig remote lscurrently opens a connection to each remote and checks if they are indeed authenticated. This is synchronous and should be done as part of an extended ping.- IPFS 0.4.19 supports
ipfs block stat --offline Qm[...]which is a good way to check if a file is available locally. Commands likebrig catand FUSE should probably gain an option that makes them output only locally cached files. Might be even the default for FUSE. Also might be a good idea to macheIsCacheda file attribute likeIsPinnedorIsExplicit. Although that might be confusing... I don't see a way yet to use this feature from the HTTP API though.