mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 18:29:03 +00:00
Merge pull request #5812 from matrix-org/jryans/cancel-security-key
Tweak security key error handling
This commit is contained in:
@@ -395,6 +395,8 @@ export async function accessSecretStorage(func = async () => { }, forceReset = f
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
SecurityCustomisations.catchAccessSecretStorageError?.(e);
|
SecurityCustomisations.catchAccessSecretStorageError?.(e);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
// Re-throw so that higher level logic can abort as needed
|
||||||
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
// Clear secret storage key cache now that work is complete
|
// Clear secret storage key cache now that work is complete
|
||||||
secretStorageBeingAccessed = false;
|
secretStorageBeingAccessed = false;
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ export class SetupEncryptionStore extends EventEmitter {
|
|||||||
// on the first trust check, and the key backup restore will happen
|
// on the first trust check, and the key backup restore will happen
|
||||||
// in the background.
|
// in the background.
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
try {
|
|
||||||
accessSecretStorage(async () => {
|
accessSecretStorage(async () => {
|
||||||
await cli.checkOwnCrossSigningTrust();
|
await cli.checkOwnCrossSigningTrust();
|
||||||
resolve();
|
resolve();
|
||||||
@@ -132,10 +131,6 @@ export class SetupEncryptionStore extends EventEmitter {
|
|||||||
await cli.restoreKeyBackupWithSecretStorage(backupInfo);
|
await cli.restoreKeyBackupWithSecretStorage(backupInfo);
|
||||||
}
|
}
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
reject(e);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (cli.getCrossSigningId()) {
|
if (cli.getCrossSigningId()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user