Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an error type for "no protocol with code" #199

Open
willscott opened this issue May 9, 2023 · 0 comments
Open

Provide an error type for "no protocol with code" #199

willscott opened this issue May 9, 2023 · 0 comments

Comments

@willscott
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant