HomePhabricator
Diffusion Comm 5750fe91839a

[lib] Propagate exceptions in keyserverAuth to callers

Description

[lib] Propagate exceptions in keyserverAuth to callers

Summary:
I had made this change initially in D11500, but I forget why so I undid it.

The reason for the change is that dispatchActionPromise will not reject if the promise passed to it rejects.

We want failures in keyserverAuth to propagate to callers. At all of its callsites, keyserverAuth calls are wrapped in a try-catch where we need to do something on failure:

  1. In KeyserverConnectionHandler here
  2. In useLogIn here
  3. In useRegistrationServerCall here

Test Plan:

  1. Force keyserver auth to fail with this patch
  2. Make sure LOG_OUT_STARTED and LOG_OUT_SUCCESS are dispatched when keyserver auth fails

Reviewers: tomek, inka

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D11837

Details

Provenance
ashoatAuthored on Mon, Apr 29, 6:01 PM
Reviewer
tomek
Differential Revision
D11837: [lib] Propagate exceptions in keyserverAuth to callers
Parents
rCOMMfd94c324c7e0: [web] add `GetDeviceListsForUsers` in `IdentityServiceClient`
Branches
Unknown
Tags
Unknown