Page MenuHomePhabricator

[lib] Propagate exceptions in keyserverAuth to callers
ClosedPublic

Authored by ashoat on Mon, Apr 29, 6:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 12, 7:37 PM
Unknown Object (File)
Sun, May 12, 3:22 PM
Unknown Object (File)
Sat, May 11, 10:30 PM
Unknown Object (File)
Thu, May 9, 12:52 PM
Unknown Object (File)
Wed, May 8, 4:17 PM
Unknown Object (File)
Wed, May 8, 10:11 AM
Unknown Object (File)
Mon, May 6, 7:37 PM
Unknown Object (File)
Tue, Apr 30, 1:06 AM
Subscribers
None

Details

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

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable