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)
Sun, May 19, 7:27 PM
Unknown Object (File)
Sun, May 19, 5:45 PM
Unknown Object (File)
Sun, May 19, 5:45 PM
Unknown Object (File)
Sun, May 19, 5:45 PM
Unknown Object (File)
Sun, May 19, 5:45 PM
Unknown Object (File)
Sat, May 18, 12:21 AM
Unknown Object (File)
Thu, May 16, 12:18 AM
Unknown Object (File)
Apr 15 2024, 3:34 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
Branch
invite2
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Apr 21 2023, 4:26 AM
native/navigation/invite-link-modal.react.js
106

Where this rethrow is caught?

native/navigation/invite-link-modal.react.js
106

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

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