go-multiaddr icon indicating copy to clipboard operation
go-multiaddr copied to clipboard

Provide an error type for "no protocol with code"

Open willscott opened this issue 2 years ago • 0 comments

Right now it's very difficult to identify if the reason a multiaddr failed is because it is corrupt, or because it uses a protocol that is newer than the parsing implementation

https://github.com/multiformats/go-multiaddr/blob/master/codec.go#L79

It would be useful to have an error type so that errors.Is can indicate that the address might be well-formed, but couldn't be parsed because it has a stanza that we don't recognize.

willscott avatar May 09 '23 20:05 willscott