Page MenuHomePhabricator

[lib] Propagate exceptions in keyserverAuth to callers
ClosedPublic

Authored by ashoat on Apr 29 2024, 6:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 8, 2:15 AM
Unknown Object (File)
Thu, Apr 3, 12:09 PM
Unknown Object (File)
Thu, Apr 3, 9:54 AM
Unknown Object (File)
Thu, Apr 3, 9:30 AM
Unknown Object (File)
Thu, Apr 3, 2:42 AM
Unknown Object (File)
Wed, Apr 2, 5:41 AM
Unknown Object (File)
Feb 18 2025, 6:35 PM
Unknown Object (File)
Feb 18 2025, 6:35 PM
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