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
F3521377: D13325.diff
Mon, Dec 23, 3:24 AM
Unknown Object (File)
Tue, Dec 17, 11:02 AM
Unknown Object (File)
Mon, Dec 16, 5:10 AM
Unknown Object (File)
Wed, Dec 4, 7:09 PM
Unknown Object (File)
Sat, Nov 30, 6:16 PM
Unknown Object (File)
Sat, Nov 30, 4:23 PM
Unknown Object (File)
Mon, Nov 25, 4:51 AM
Unknown Object (File)
Nov 14 2024, 1:01 PM
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.