Page MenuHomePhabricator

[native] Handle error state when joining a community
ClosedPublic

Authored by tomek on Apr 21 2023, 4:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 15, 3:34 AM
Unknown Object (File)
Sat, Apr 13, 3:35 AM
Unknown Object (File)
Wed, Apr 10, 3:38 PM
Unknown Object (File)
Apr 3 2024, 8:23 PM
Unknown Object (File)
Apr 3 2024, 8:23 PM
Unknown Object (File)
Apr 3 2024, 8:23 PM
Unknown Object (File)
Apr 3 2024, 8:22 PM
Unknown Object (File)
Apr 3 2024, 8:22 PM
Subscribers

Details

Summary

When an error occurs, we're updating the params to let the user know that the link is invalid. This isn't ideal, as the error might be caused by e.g. a timeout and a link is still valid, but it is by far the simplest solution.

Depends on D7558

Test Plan

Introduce a sleep on server side and the throw. Check if the error state becomes enabled.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek requested review of this revision.Apr 21 2023, 4:26 AM
native/navigation/invite-link-modal.react.js
106 ↗(On Diff #25513)

Where this rethrow is caught?

native/navigation/invite-link-modal.react.js
106 ↗(On Diff #25513)

Since it is dispatched by dispatchActionPromise, it gets caught here: https://github.com/CommE2E/comm/blob/master/lib/utils/action-utils.js#L88

bartek added inline comments.
native/navigation/invite-link-modal.react.js
106 ↗(On Diff #25513)

Ah right, I missed the dispatchActionPromise, thanks for the explanation!

This revision is now accepted and ready to land.Apr 25 2023, 4:20 AM