diff --git a/src/Utility/PrivacyAsyncStorage.ts b/src/Utility/PrivacyAsyncStorage.ts index 8c23dde19..dfd310aa7 100644 --- a/src/Utility/PrivacyAsyncStorage.ts +++ b/src/Utility/PrivacyAsyncStorage.ts @@ -63,7 +63,14 @@ export class PrivacyAsyncStorage { : (this.#options.version || 1) + 1; return; } - rethrow(e); + rethrow( + e, + 'Unexpected error while opening IndexedDB in PrivacyAsyncStorage.getDb', + { + options: this.#options, + }, + 'An unexpected error occurred while trying to open the database.' + ); }) .then((db) => { if (db && !db.objectStoreNames.contains(this.#options.storeName)) { @@ -141,7 +148,12 @@ export class PrivacyAsyncStorage { db?.close(); return; } - rethrow(e); + rethrow( + e, + 'Error in doesStoreExist', + { name, storeName, db }, + 'An unexpected error occured while trying to access the browser database.' + ); }); if (db) {