Budibase/budibase · warning · FeatureDisabledWarning
FEATURE_DISABLED
FEATURE_DISABLED
Error message
Feature disabled: '${featureFlag}' What it means
checkFeature asserts that a single licensed feature flag is enabled for the tenant by delegating to areFeaturesEnabled; if the license lacks the feature it throws a FeatureDisabledWarning carrying code FEATURE_DISABLED. The message embeds the specific Feature enum value that is unavailable, letting callers branch on which feature failed.
Source
Thrown at packages/pro/src/sdk/features/features.ts:27
license?: License
) {
if (!Array.isArray(featureFlags)) {
featureFlags = [featureFlags]
}
if (!license) {
license = await cache.getCachedLicense()
}
for (let flag of featureFlags) {
if (!license?.features.includes(flag)) {
return false
}
}
return true
}
export async function checkFeature(featureFlag: Feature, license?: License) {
if (!(await areFeaturesEnabled(featureFlag, license))) {
throw new FeatureDisabledWarning(featureFlag)
}
}
export async function checkFeatures(
featureFlags: Feature[],
license?: License
) {
if (!(await areFeaturesEnabled(featureFlags, license))) {
const flagsMsg = featureFlags.join(", ")
throw new FeatureDisabledWarning(flagsMsg)
}
}
// BACKUPS
export function checkBackups<Args extends any[], Return>(
targetFunction: (...parameters: Args) => Return
): (...parameters: Args) => Promise<Return> {View on GitHub (pinned to a81a902e9a)
Solutions
- Upgrade the tenant's license to one that includes the flagged feature, or start a trial that grants it.
- Refresh the cached license so newly purchased features are visible to licensing checks.
- Wrap the feature-gated code in a check for the feature (or catch FeatureDisabledWarning) and degrade gracefully.
- Verify the correct tenant/workspace context is being used so the right license is evaluated.
Example fix
// before
await requireFeature(Feature.SCIM)
// after
if (await areFeaturesEnabled(Feature.SCIM)) {
await requireFeature(Feature.SCIM)
} else {
// show upsell / disable feature in UI
} Defensive patterns
Strategy: try-catch
Validate before calling
const enabled = await areFeaturesEnabled(featureFlag)
if (!enabled) { /* disable feature or show upsell */ } Try / catch
try {
await requireFeature(Feature.SCIM)
runScimFlow()
} catch (err) {
if (err instanceof FeatureDisabledWarning) {
// degrade gracefully / show upgrade prompt
} else throw err
} Prevention
- Prefer areFeaturesEnabled lookups for UI gating over throwing checks
- Refresh the cached license after plan changes
- Check the tenant context is correct before feature checks
When it happens
Trigger: Calling requireFeature or checkFeature (directly or via checkBackups/update wrappers) with a Feature the tenant's license does not include, e.g. invoking a backup/SCIM/custom-branding flow on a plan lacking that feature.
Common situations: Free or lower-tier plan attempting Pro-only functionality; expired or downgraded license; self-hosted install without an applied license key; stale cached license missing newly purchased features.
Related errors
- User does not have access to environment variables feature.
- Unable to assign roles - license required.
- Unable to un-assign roles - license required.
- Audit logs not available - license required.
- Error getting license: ${message}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/6af43877327f9a1a.
Report an issue: GitHub.