Add try-catch to syncLicenseKeyOnPremFeatures

This commit is contained in:
carlosmonastyrski
2025-04-02 16:36:17 -03:00
parent 7634fc94a6
commit 064322936b
@@ -87,10 +87,14 @@ export const licenseServiceFactory = ({
); );
const syncLicenseKeyOnPremFeatures = async () => { const syncLicenseKeyOnPremFeatures = async () => {
const { try {
data: { currentPlan } const {
} = await licenseServerOnPremApi.request.get<{ currentPlan: TFeatureSet }>("/api/license/v1/plan"); data: { currentPlan }
onPremFeatures = currentPlan; } = await licenseServerOnPremApi.request.get<{ currentPlan: TFeatureSet }>("/api/license/v1/plan");
onPremFeatures = currentPlan;
} catch (error) {
logger.error(error, "Failed to synchronize license key features");
}
}; };
const init = async () => { const init = async () => {