Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update VaultMessageHandler.ts (#2177)

Leendert de Borst2a93441ee925
diff --git a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts
index 64b506596..52f78201b 100644
--- a/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts
+++ b/apps/browser-extension/src/entrypoints/background/VaultMessageHandler.ts
@@ -853,8 +853,9 @@ async function uploadNewVaultToServer(sqliteClient: SqliteClient) : Promise<Vaul
/**
* Create a new sqlite client for the stored vault.
* Uses a cache to avoid repeated decryption and initialization for read operations.
+ * Throws when the vault is missing or locked.
*/
-async function createVaultSqliteClient() : Promise<SqliteClient> {
+export async function createVaultSqliteClient() : Promise<SqliteClient> {
// Read from local: storage for persistent vault access
const encryptedVault = await storage.getItem('local:encryptedVault') as string;
const encryptionKey = await handleGetEncryptionKey();