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)
Fri, Dec 13, 6:57 PM
Unknown Object (File)
Nov 9 2024, 7:00 AM
Unknown Object (File)
Nov 9 2024, 3:04 AM
Unknown Object (File)
Nov 9 2024, 2:15 AM
Unknown Object (File)
Oct 28 2024, 1:26 AM
Unknown Object (File)
Oct 28 2024, 1:26 AM
Unknown Object (File)
Oct 28 2024, 1:26 AM
Unknown Object (File)
Oct 28 2024, 1:26 AM
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