1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

Add the key definition name in the error for buildKey (#8355)

This commit is contained in:
Justin Baur 2024-03-15 15:15:53 -05:00 committed by GitHub
parent b99153a016
commit 4fabc94c3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,7 +138,9 @@ export class UserKeyDefinition<T> {
buildKey(userId: UserId) { buildKey(userId: UserId) {
if (!Utils.isGuid(userId)) { if (!Utils.isGuid(userId)) {
throw new Error("You cannot build a user key without a valid UserId"); throw new Error(
`You cannot build a user key without a valid UserId, building for key ${this.fullName}`,
);
} }
return `user_${userId}_${this.stateDefinition.name}_${this.key}` as StorageKey; return `user_${userId}_${this.stateDefinition.name}_${this.key}` as StorageKey;
} }