Page MenuHomePhabricator

[lib] Handle identity timeout when fetching device lists
Needs ReviewPublic

Authored by inka on Fri, Oct 18, 3:36 AM.

Details

Reviewers
tomek
kamil
Summary

issue: ENG-9725

Test Plan

Tested that if the timeout occurs and the error is thrown, the accountMissingStatus of users is not updated and the user is not deleted, even if they were missing a device list

Diff Detail

Repository
rCOMM Comm
Branch
inka/missing_peers
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/handlers/user-infos-handler.react.js
171–173

If a timeout occurred, we actually want to query for those users again

lib/hooks/peer-list-hooks.js
60–64

I don't think it's worth merging this with the function used in UserIdentityCacheProvider. They are so simple that merging them would just introduce complexity at the call site.

lib/utils/identity-service.js
48

The timeout before an error on the native side is thrown is 30s D13355
Ideally we would be getting informed by the native side about the timeout and only handling it on the JS side. But because the native error handling is broken for now (ENG-9730) I am using this solution that is mimicking the solution from UserIdentityCacheProvider which is also working around this problem.
Using the same value as UserIdentityCacheProvider.

inka requested review of this revision.Fri, Oct 18, 3:54 AM