Page MenuHomePhabricator

[lib] Don't swallow errors in getUserIdentities() call
Needs ReviewPublic

Authored by angelika on Thu, Nov 14, 12:51 PM.

Details

Reviewers
tomek
kamil
Summary
Test Plan
  1. Throw some error in fetchUserIdentitiesPromise() so that finding user indentity always fails
  2. Mobile user goes to profile -> Friend list and adds the web user as a friend
  3. Before a thin thread was created. Now mobile user sees an alert, because there is no auxUserInfo, no thick thread and call to identity server fails.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

This is a scary change... it affects all callers of useFindUserIdentities:

  • FarcasterDataHandler
  • UserInfosHandler
  • useSendDMOperationUtils
  • useThreadListSearch via useUsersSupportThickThreads
  • useUserProfileThreadInfo via useUsersSupportThickThreads
  • Thread composer code (ConnectedMessageListContainer on native, ChatThreadComposer on web) via useUsersSupportThickThreads
  • useThreadInfoForPossiblyPendingThread on web via useUsersSupportThickThreads
  • useUpdateRelationships (after D13938, via useUsersSupportThickThreads)

Is this really safe for all of those callers?

I'm also a bit confused as to why this is necessary or what it accomplishes. I re-read through the Linear task but couldn't find anything. Could you explain why we want to stop swallowing errors here?