ChangeRecoveryKey: error handling (#29262)
* CreateSecretStorageDialog: error handling I'm fed up with setup operations in EW failing silently. Rather than leaving the user with a mysteriously broken client, let's at least tell them that something has gone wrong, so that they can report the issue and we can investigate. Obviously, showing an unactionable Error dialog is a last resort: ideally, we should handle the error ourselves, or give the user actionable steps to resolve the problem. But that takes significant design and engineering. Just swallowing errors is the worst of all possible options. * Fix typo in test name * Improve test coverage
This commit is contained in:
committed by
GitHub
parent
6dbc3b489a
commit
a365533367
@@ -19,7 +19,6 @@ import {
|
||||
} from "@vector-im/compound-web";
|
||||
import CopyIcon from "@vector-im/compound-design-tokens/assets/web/icons/copy";
|
||||
import KeyIcon from "@vector-im/compound-design-tokens/assets/web/icons/key-solid";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { _t } from "../../../../languageHandler";
|
||||
import { EncryptionCard } from "./EncryptionCard";
|
||||
@@ -28,6 +27,7 @@ import { useAsyncMemo } from "../../../../hooks/useAsyncMemo";
|
||||
import { copyPlaintext } from "../../../../utils/strings";
|
||||
import { initialiseDehydrationIfEnabled } from "../../../../utils/device/dehydration.ts";
|
||||
import { withSecretStorageKeyCache } from "../../../../SecurityManager";
|
||||
import { logErrorAndShowErrorDialog } from "../../../../utils/ErrorUtils.tsx";
|
||||
|
||||
/**
|
||||
* The possible states of the component.
|
||||
@@ -132,7 +132,7 @@ export function ChangeRecoveryKey({
|
||||
});
|
||||
onFinish();
|
||||
} catch (e) {
|
||||
logger.error("Failed to bootstrap secret storage", e);
|
||||
logErrorAndShowErrorDialog("Failed to set up secret storage", e);
|
||||
}
|
||||
}}
|
||||
submitButtonLabel={
|
||||
|
||||
Reference in New Issue
Block a user