js-kubo-rpc-client icon indicating copy to clipboard operation
js-kubo-rpc-client copied to clipboard

Don't fail on unknown codec / protocol

Open lidel opened this issue 2 years ago • 0 comments

Various commands return CID or Multiaddr instances.

For example, fetching ipfs.swarm.peers will return peers and their protocols.

The problem is that over time new codecs and protocols identified by new codes from this table appear, and software that uses older version of this library should not crash like it currently does.

Some examples: https://github.com/ipfs/ipfs-webui/issues/2033, https://github.com/ipfs/ipfs-desktop/pull/2363#issuecomment-1354035844.

Solution

TBD, may require upstream changes to https://github.com/multiformats/js-multiaddr and https://github.com/multiformats/js-multiformats/, or maybe just ignoring (skipping) unsupported entries is enough?

lidel avatar Dec 16 '22 01:12 lidel