(core) Fix delete user button for Google-only accounts

Summary:
An unhandled error was being thrown by CognitoClient when a user was unable
to be found during account deletion. Google-only accounts are no longer
associated with a user in Cognito, so the error was actually benign. A warning is
now logged instead.

Test Plan: Manual.

Reviewers: paulfitz, jarek

Reviewed By: paulfitz, jarek

Differential Revision: https://phab.getgrist.com/D4073
This commit is contained in:
George Gevoian
2023-10-18 10:31:58 -04:00
parent f6256646ef
commit 74485f412d
3 changed files with 7 additions and 6 deletions

View File

@@ -117,8 +117,7 @@ export class Doom {
await this._notifier.deleteUser(userId);
// Remove user from cognito
const fullUser = this._dbManager.makeFullUser(user);
await this._loginSystem.deleteUser(fullUser);
await this._loginSystem.deleteUser(user);
// Remove user from our db
await this._dbManager.deleteUser({userId}, userId);