{"record":{"id":"b959104bd090c3ab","repo":"RocketChat/Rocket.Chat","slug":"restricted-workspace","errorCode":"restricted-workspace","errorMessage":"restricted-workspace","messagePattern":"restricted-workspace","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"apps/meteor/ee/server/patches/airGappedRestrictionsWrapper.ts","lineNumber":7,"sourceCode":"import { AirGappedRestriction } from '@rocket.chat/license';\n\nimport { applyAirGappedRestrictionsValidation } from '../../../server/lib/cloud/license/airGappedRestrictionsWrapper';\n\napplyAirGappedRestrictionsValidation.patch(async <T>(_: any, fn: () => Promise<T>): Promise<T> => {\n\tif (AirGappedRestriction.restricted) {\n\t\tthrow new Error('restricted-workspace');\n\t}\n\treturn fn();\n});\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/ee/server/patches/airGappedRestrictionsWrapper.ts#L1-L11","documentation":"The enterprise patch airGappedRestrictionsWrapper (apps/meteor/ee/server/patches/airGappedRestrictionsWrapper.ts:7) replaces applyAirGappedRestrictionsValidation so that, when AirGappedRestriction.restricted is true (an air-gapped workspace whose license does not permit offline operation), every wrapped operation throws a plain Error('restricted-workspace') instead of running. Wrapped call sites include the sendMessage/updateMessage Meteor methods and REST endpoints such as chat.sendMessage, chat.updateMessage, chat.postMessage/chat.webhook processing, and rooms.createDiscussion.","triggerScenarios":"Sending or editing messages, posting via webhook, or creating a discussion while the workspace is air-gapped (no cloud connectivity) and its license state marks it restricted — e.g. the offline license validation/grace period failed or the license lacks the air-gapped entitlement.","commonSituations":"Fully offline installs whose license cannot be validated because the server has no route to Rocket.Chat cloud; license expired on an air-gapped network; firewall/DNS changes severing license validation after a grace window.","solutions":["Restore outbound connectivity to the Rocket.Chat cloud so the license can validate and AirGappedRestriction.restricted clears","Apply a valid enterprise license that includes the air-gapped entitlement (offline licensing)","Inspect AirGappedRestriction state and license status (Administration > License) to confirm the restriction before users hit it","If unintended, check for proxy/firewall changes blocking license validation traffic"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { AirGappedRestriction } from '@rocket.chat/license';\n\nif (AirGappedRestriction.restricted) {\n\t// writes (send/update message, discussions, webhooks) will throw 'restricted-workspace'\n\tthrow new Error('restricted-workspace');\n}\nawait sendMessage(user, message);","typeGuard":null,"tryCatchPattern":"try {\n\tawait applyAirGappedRestrictionsValidation(() => executeSendMessage(user, message));\n} catch (e) {\n\tif (e instanceof Error && e.message === 'restricted-workspace') {\n\t\t// license/air-gap restriction: surface an admin notice; retrying will not help until the license validates\n\t}\n\tthrow e;\n}","preventionTips":["For air-gapped deployments, obtain a license with the air-gapped entitlement before going offline","Monitor license validation status and alert before the restriction engages","Keep an outbound path to Rocket.Chat cloud available, or plan license renewal windows for connected periods","Note the error is a plain Error (message 'restricted-workspace'), not a Meteor.Error with a code"],"tags":["license","air-gapped","enterprise","write-blocked","messages"],"backgroundTag":"license-restriction-blocked","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}