diff --git a/src/BasePlatform.ts b/src/BasePlatform.ts index f3b26ec510..9aabe82be5 100644 --- a/src/BasePlatform.ts +++ b/src/BasePlatform.ts @@ -317,7 +317,9 @@ export default abstract class BasePlatform { let data; try { data = await idbLoad("pickleKey", [userId, deviceId]); - } catch (e) {} + } catch (e) { + logger.error("idbLoad for pickleKey failed", e); + } if (!data) { return null; } @@ -396,6 +398,8 @@ export default abstract class BasePlatform { async destroyPickleKey(userId: string, deviceId: string): Promise { try { await idbDelete("pickleKey", [userId, deviceId]); - } catch (e) {} + } catch (e) { + logger.error("idbDelete failed in destroyPickleKey", e); + } } } diff --git a/src/Lifecycle.ts b/src/Lifecycle.ts index d53bd39c95..d179f9bed3 100644 --- a/src/Lifecycle.ts +++ b/src/Lifecycle.ts @@ -324,7 +324,9 @@ export async function getStoredSessionVars(): Promise { let accessToken; try { accessToken = await StorageManager.idbLoad("account", "mx_access_token"); - } catch (e) {} + } catch (e) { + logger.error("StorageManager.idbLoad failed for account:mx_access_token", e); + } if (!accessToken) { accessToken = localStorage.getItem("mx_access_token"); if (accessToken) { @@ -332,7 +334,9 @@ export async function getStoredSessionVars(): Promise { // try to migrate access token to IndexedDB if we can await StorageManager.idbSave("account", "mx_access_token", accessToken); localStorage.removeItem("mx_access_token"); - } catch (e) {} + } catch (e) { + logger.error("migration of access token to IndexedDB failed", e); + } } } // if we pre-date storing "mx_has_access_token", but we retrieved an access @@ -858,7 +862,9 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise