Add the key definition name in the error for buildKey (#8355)
This commit is contained in:
parent
b99153a016
commit
4fabc94c3c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue