Add try-catch to syncLicenseKeyOnPremFeatures

This commit is contained in:
carlosmonastyrski
2025-04-02 16:36:17 -03:00
parent 7634fc94a6
commit 064322936b

View File

@@ -87,10 +87,14 @@ export const licenseServiceFactory = ({
);
const syncLicenseKeyOnPremFeatures = async () => {
const {
data: { currentPlan }
} = await licenseServerOnPremApi.request.get<{ currentPlan: TFeatureSet }>("/api/license/v1/plan");
onPremFeatures = currentPlan;
try {
const {
data: { 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 () => {