Page MenuHomePhabricator

[lib] Propagate exceptions in keyserverAuth to callers
ClosedPublic

Authored by ashoat on Apr 29 2024, 6:29 PM.
Tags
None
Referenced Files
F3301268: D11837.id39677.diff
Mon, Nov 18, 1:23 AM
Unknown Object (File)
Tue, Nov 12, 4:38 AM
Unknown Object (File)
Tue, Nov 12, 2:40 AM
Unknown Object (File)
Tue, Nov 12, 1:26 AM
Unknown Object (File)
Mon, Nov 11, 7:02 PM
Unknown Object (File)
Sun, Oct 20, 1:49 PM
Unknown Object (File)
Oct 11 2024, 9:16 AM
Unknown Object (File)
Oct 11 2024, 9:16 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