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)
Thu, Nov 14, 1:01 PM
Unknown Object (File)
Thu, Nov 14, 12:59 PM
Unknown Object (File)
Tue, Nov 12, 4:05 PM
Unknown Object (File)
Sat, Nov 9, 6:14 PM
Unknown Object (File)
Oct 20 2024, 2:58 PM
Unknown Object (File)
Oct 20 2024, 2:58 PM
Unknown Object (File)
Oct 20 2024, 2:57 PM
Unknown Object (File)
Oct 15 2024, 1:58 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #44138)

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 ↗(On Diff #44138)

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.