You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Merge pull request #4009 from matrix-org/dbkr/log_exceptions_other_than_cancel
Log exceptions from accessSecretStorage
This commit is contained in:
@@ -37,6 +37,12 @@ function isCachingAllowed() {
|
||||
);
|
||||
}
|
||||
|
||||
export class AccessCancelledError extends Error {
|
||||
constructor() {
|
||||
super("Secret storage access canceled");
|
||||
}
|
||||
}
|
||||
|
||||
async function getSecretStorageKey({ keys: keyInfos }) {
|
||||
const keyInfoEntries = Object.entries(keyInfos);
|
||||
if (keyInfoEntries.length > 1) {
|
||||
@@ -74,7 +80,7 @@ async function getSecretStorageKey({ keys: keyInfos }) {
|
||||
);
|
||||
const [input] = await finished;
|
||||
if (!input) {
|
||||
throw new Error("Secret storage access canceled");
|
||||
throw new AccessCancelledError();
|
||||
}
|
||||
const key = await inputToKey(input);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user