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

Handle errors when receiving bad data from peers #514

Closed
2 tasks done
EvanHahn opened this issue Mar 11, 2024 · 0 comments · Fixed by #566
Closed
2 tasks done

Handle errors when receiving bad data from peers #514

EvanHahn opened this issue Mar 11, 2024 · 0 comments · Fixed by #566
Assignees
Labels
mvp Requirement for MVP

Comments

@EvanHahn
Copy link
Contributor

EvanHahn commented Mar 11, 2024

Description

If LocalPeers.prototype.#handleMessage throws, we should handle that better.

https://github.com/digidem/mapeo-core-next/blob/30e637ba74168d106e17d7b3de349abd97f51c74/src/local-peers.js#L513

This can happen if someone sends an invalid message but could also happen if something in that function throws.

Tasks

  • Improve error handling when receiving a bad message from a local peer
  • Add tests
@EvanHahn EvanHahn added the mvp Requirement for MVP label Mar 11, 2024
@EvanHahn EvanHahn self-assigned this Mar 11, 2024
EvanHahn added a commit that referenced this issue Apr 16, 2024
We shouldn't choke on invalid messages, such as invites. This code
worked but was untested.

I needed to put up some additional scaffolding to make this testable.

Closes [#514].

[#514]: #514
EvanHahn added a commit that referenced this issue Apr 16, 2024
We shouldn't choke on invalid messages, such as invites. This code
worked but was untested.

I needed to put up some additional scaffolding to make this testable.

Closes [#514].

[#514]: #514
EvanHahn added a commit that referenced this issue May 1, 2024
We shouldn't choke on invalid messages, such as invites. This code
worked but was untested.

I needed to put up some additional scaffolding to make this testable.

Closes [#514].

[#514]: #514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mvp Requirement for MVP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant