1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

improve error strings in crypto service

This commit is contained in:
Jacob Fink
2023-06-14 15:50:01 -04:00
parent 2dbe03ba11
commit b9de7535ca

View File

@@ -166,7 +166,7 @@ export class CryptoService implements CryptoServiceAbstraction {
): Promise<UserSymKey> { ): Promise<UserSymKey> {
masterKey ||= await this.getMasterKey(); masterKey ||= await this.getMasterKey();
if (masterKey == null) { if (masterKey == null) {
throw new Error("No Master Key found."); throw new Error("No master key found.");
} }
if (!userSymKey) { if (!userSymKey) {
@@ -174,7 +174,7 @@ export class CryptoService implements CryptoServiceAbstraction {
userId: userId, userId: userId,
}); });
if (userSymKeyMasterKey == null) { if (userSymKeyMasterKey == null) {
throw new Error("No User Key found."); throw new Error("No encrypted user key found.");
} }
userSymKey = new EncString(userSymKeyMasterKey); userSymKey = new EncString(userSymKeyMasterKey);
} }