Bring back try-catch for initGlobalFeatureSet

This commit is contained in:
Tuan Dang
2023-06-07 23:13:25 +01:00
parent 7cec42a7fb
commit c0563aff77
@@ -1,3 +1,4 @@
import * as Sentry from '@sentry/node';
import NodeCache from 'node-cache'; import NodeCache from 'node-cache';
import { import {
getLicenseKey, getLicenseKey,
@@ -97,6 +98,7 @@ class EELicenseService {
const licenseServerKey = await getLicenseServerKey(); const licenseServerKey = await getLicenseServerKey();
const licenseKey = await getLicenseKey(); const licenseKey = await getLicenseKey();
try {
if (licenseServerKey) { if (licenseServerKey) {
// license server key is present -> validate it // license server key is present -> validate it
const token = await refreshLicenseServerKeyToken() const token = await refreshLicenseServerKeyToken()
@@ -121,6 +123,11 @@ class EELicenseService {
this.instanceType = 'enterprise-self-hosted'; this.instanceType = 'enterprise-self-hosted';
} }
} }
} catch (err) {
// case: self-hosted free
Sentry.setUser(null);
Sentry.captureException(err);
}
} }
public get isLicenseValid(): boolean { public get isLicenseValid(): boolean {