Page MenuHomePhabricator

[lib] update `processOutboundP2PMessages` to return failed message IDs
ClosedPublic

Authored by kamil on Sep 13 2024, 3:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 20, 2:58 PM
Unknown Object (File)
Sun, Oct 20, 2:58 PM
Unknown Object (File)
Sun, Oct 20, 2:57 PM
Unknown Object (File)
Tue, Oct 15, 1:58 AM
Unknown Object (File)
Tue, Oct 15, 1:22 AM
Unknown Object (File)
Mon, Oct 14, 2:29 PM
Unknown Object (File)
Oct 2 2024, 3:32 AM
Unknown Object (File)
Sep 29 2024, 8:24 AM
Subscribers

Details

Summary

ENG-8424.

This was confusing, updating to returned failed messages to throw error and handle this as part of *actionTypes.failed.

Depends on D13324

Test Plan

Check that on success of all messages array is empty, otherwise it returns failed messages.

Diff Detail

Repository
rCOMM Comm
Branch
publish
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Sep 13 2024, 4:35 AM
tomek added inline comments.
lib/tunnelbroker/peer-to-peer-context.js
197–199

It is quite confusing that this function returns IDs of failed messages. How about modifying the return type to be an object with the IDs, e.g. {+result: 'success'} | {+result: 'failure', +failedMessageIDs: $ReadOnlyArray<string>}?

This revision is now accepted and ready to land.Sep 13 2024, 6:19 AM
lib/tunnelbroker/peer-to-peer-context.js
197–199

That's a good point, but updating this here will cause a lot of changes in the code that will be removed anyway in D13330, to save some time I created D13351 to address this.