Add try catch to handler
This commit is contained in:
parent
630eb14686
commit
c6ce0c1766
|
@ -30,6 +30,7 @@ export class DefaultUserAsymmetricKeysRegenerationService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async handleUserAsymmetricKeysRegeneration(userId: UserId): Promise<void> {
|
async handleUserAsymmetricKeysRegeneration(userId: UserId): Promise<void> {
|
||||||
|
try {
|
||||||
const privateKeyRegenerationFlag = await this.configService.getFeatureFlag(
|
const privateKeyRegenerationFlag = await this.configService.getFeatureFlag(
|
||||||
FeatureFlag.PrivateKeyRegeneration,
|
FeatureFlag.PrivateKeyRegeneration,
|
||||||
);
|
);
|
||||||
|
@ -40,6 +41,13 @@ export class DefaultUserAsymmetricKeysRegenerationService
|
||||||
await this.regenerateUserAsymmetricKeys(userId);
|
await this.regenerateUserAsymmetricKeys(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.logService.error(
|
||||||
|
"[UserAsymmetricKeyRegeneration] User Key regeneration error: " +
|
||||||
|
error +
|
||||||
|
" Skipping regeneration for the user.",
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async shouldRegenerate(userId: UserId): Promise<boolean> {
|
private async shouldRegenerate(userId: UserId): Promise<boolean> {
|
||||||
|
|
Loading…
Reference in New Issue