-
Notifications
You must be signed in to change notification settings - Fork 50
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
Make decapsulate return an error if the protocol is not found #15
Comments
Sounds good. |
Old issue but I might be able to help here, if this hasn’t been handled yet. :) |
@deg4uss3r I don't think this has been handled yet, but you might want to look at #25 first which changes a lot of things around |
Cool! I’ll hold off until that’s merged in. |
If this is wanted I can easily add change the final |
Closing here since |
The doc of
decapsulate
currently reads: “Returns the original if the passed in address is not found”.Could you change the behavior of
decapsulate
to return an error of the protocol is not found? This way we have a way to know the protocol was not in the multiaddr.Additionally, it forces users of
decapsulate
to explicitly handle this case when calling it.The text was updated successfully, but these errors were encountered: