Tweak security key error handling
This reworks error handling of "use security key" so we stop the overall operation when cancelling access (instead of just the immediate prompt). In addition, flowing the error to outer catch block also handles resetting state to re-display the initial verification choices. Fixes https://github.com/vector-im/element-web/issues/15584
This commit is contained in:
parent
ce19d07850
commit
02548cf743
2 changed files with 12 additions and 15 deletions
|
@ -395,6 +395,8 @@ export async function accessSecretStorage(func = async () => { }, forceReset = f
|
|||
} catch (e) {
|
||||
SecurityCustomisations.catchAccessSecretStorageError?.(e);
|
||||
console.error(e);
|
||||
// Re-throw so that higher level logic can abort as needed
|
||||
throw e;
|
||||
} finally {
|
||||
// Clear secret storage key cache now that work is complete
|
||||
secretStorageBeingAccessed = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue