mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +00:00
Bring back try-catch for initGlobalFeatureSet
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as Sentry from '@sentry/node';
|
||||
import NodeCache from 'node-cache';
|
||||
import {
|
||||
getLicenseKey,
|
||||
@@ -97,6 +98,7 @@ class EELicenseService {
|
||||
const licenseServerKey = await getLicenseServerKey();
|
||||
const licenseKey = await getLicenseKey();
|
||||
|
||||
try {
|
||||
if (licenseServerKey) {
|
||||
// license server key is present -> validate it
|
||||
const token = await refreshLicenseServerKeyToken()
|
||||
@@ -121,6 +123,11 @@ class EELicenseService {
|
||||
this.instanceType = 'enterprise-self-hosted';
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
// case: self-hosted free
|
||||
Sentry.setUser(null);
|
||||
Sentry.captureException(err);
|
||||
}
|
||||
}
|
||||
|
||||
public get isLicenseValid(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user