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

Catch error when unmarshaling public key instead of crashing #71

Closed
mkg20001 opened this issue Nov 27, 2017 · 2 comments
Closed

Catch error when unmarshaling public key instead of crashing #71

mkg20001 opened this issue Nov 27, 2017 · 2 comments

Comments

@mkg20001
Copy link
Member

This line here https://github.com/libp2p/js-peer-id/blob/master/src/index.js#L173 makes the app crash if the supplied public key isn't valid (for example if the buffer isn't even a protocol buffers object)

Instead the error should be caught and returned via callback

@mkg20001
Copy link
Member Author

PR #72

@daviddias
Copy link
Member

Continue on #72

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

2 participants