RocketChat/Rocket.Chat · error · Error

restricted-workspace

Error message

restricted-workspace

What it means

Thrown by the air-gapped restriction patcher whenever AirGappedRestriction.restricted is true. Rocket.Chat Enterprise wraps certain cloud-touching operations with applyAirGappedRestrictionsValidation; if the workspace is detected as air-gapped (no contact with the licensing cloud) and the restriction is active, every wrapped call is short-circuited and throws this plain Error before the real function runs.

Source

Thrown at apps/meteor/ee/server/patches/airGappedRestrictionsWrapper.ts:7

import { AirGappedRestriction } from '@rocket.chat/license';

import { applyAirGappedRestrictionsValidation } from '../../../server/lib/cloud/license/airGappedRestrictionsWrapper';

applyAirGappedRestrictionsValidation.patch(async <T>(_: any, fn: () => Promise<T>): Promise<T> => {
	if (AirGappedRestriction.restricted) {
		throw new Error('restricted-workspace');
	}
	return fn();
});

View on GitHub (pinned to f9d3ec372b)

Solutions

  1. Restore outbound connectivity to the Rocket.Chat cloud so the license can re-validate.
  2. Renew or install a valid Enterprise license that permits the air-gapped mode you are running in.
  3. Check that AirGappedRestriction.restricted is not stuck true after a transient outage (restart/reload the license module).
  4. If the operation should be allowed offline, confirm the wrapped function is meant to be gated and contact Rocket.Chat support about your license tier.
Defensive patterns

Strategy: try-catch

Validate before calling

function isWorkspaceRestricted(): boolean {
  return AirGappedRestriction.restricted;
}
// if (isWorkspaceRestricted()) surface a license/connectivity warning to admins.

Try / catch

try {
  await cloudWrappedOperation();
} catch (e) {
  if (e.message === 'restricted-workspace') {
    // surface a 'workspace is air-gapped / license cannot validate' message
  } else throw e;
}

Prevention

When it happens

Trigger: Invoking any function patched by applyAirGappedRestrictionsValidation while the server cannot reach the Rocket.Chat cloud and the license module has flagged the workspace as restricted.

Common situations: Offline/firewalled deployment whose Enterprise license requires periodic cloud validation; proxy/DNS outage blocking cloud.rocket.chat; expired or revoked air-gapped license; time skew on the server making the license appear invalid.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12). Data as JSON: /api/errors/b959104bd090c3ab. Report an issue: GitHub.