{"record":{"id":"e50bd3b6f4cac069","repo":"RocketChat/Rocket.Chat","slug":"error-mac-limit-reached-e50bd3","errorCode":null,"errorMessage":"error-mac-limit-reached","messagePattern":"error-mac-limit-reached","errorType":"exception","errorClass":"Error","httpStatus":400,"severity":"error","filePath":"apps/meteor/server/api/v1/omnichannel/transcript.ts","lineNumber":49,"sourceCode":"\t\t\tPOST: isPOSTLivechatTranscriptRequestParams,\n\t\t},\n\t},\n\t{\n\t\tasync delete() {\n\t\t\tconst { rid } = this.urlParams;\n\t\t\tconst room = await LivechatRooms.findOneById<Pick<IOmnichannelRoom, 'open' | 'transcriptRequest' | 'v'>>(rid, {\n\t\t\t\tprojection: { open: 1, transcriptRequest: 1, v: 1 },\n\t\t\t});\n\n\t\t\tif (!room?.open) {\n\t\t\t\tthrow new Error('error-invalid-room');\n\t\t\t}\n\t\t\tif (!room.transcriptRequest) {\n\t\t\t\tthrow new Error('error-transcript-not-requested');\n\t\t\t}\n\n\t\t\tif (!(await Omnichannel.isWithinMACLimit(room))) {\n\t\t\t\tthrow new Error('error-mac-limit-reached');\n\t\t\t}\n\n\t\t\tawait LivechatRooms.unsetEmailTranscriptRequestedByRoomId(rid);\n\n\t\t\treturn API.v1.success();\n\t\t},\n\t\tasync post() {\n\t\t\tconst { rid } = this.urlParams;\n\t\t\tconst { email, subject } = this.bodyParams;\n\n\t\t\tconst user = await Users.findOneById(this.userId, {\n\t\t\t\tprojection: { _id: 1, username: 1, name: 1, utcOffset: 1 },\n\t\t\t});\n\n\t\t\tif (!user) {\n\t\t\t\tthrow new Error('error-invalid-user');\n\t\t\t}\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/api/v1/omnichannel/transcript.ts#L31-L67","documentation":"Thrown by POST/DELETE /api/v1/livechat/transcript/:rid when Omnichannel.isWithinMACLimit(room) is false. MAC = Monthly Active Contacts, an Enterprise licensing limit. The check (apps/meteor/server/services/omnichannel/service.ts:55) fails when this room's visitor has NOT already been counted in the current month AND the license says the monthlyActiveContacts limit has been reached — so processing this room would add a new billable active contact, which the license forbids.","triggerScenarios":"Enterprise workspace with a trial or Starter/Pro license hit its monthly active contacts ceiling; the visitor of this room is new this month; then any transcript request/cancel (and likewise chat continuation, queue placement, message sends) is refused with error-mac-limit-reached.","commonSituations":"Trials that expire mid-month after a spike in contacts; on-premise licenses not renewed; importing/re-opening old conversations whose visitors were not yet counted this month. CE workspaces without a license never hit this (they fall back to no MAC limit).","solutions":["Check Administration -> Info/License: verify the Enterprise license is valid and inspect the monthlyActiveContacts limit and current usage","Wait for the calendar-month reset — the counter is keyed on moment.utc().format('YYYY-MM')","Reduce active contacts (close rooms, delete unneeded visitors via the visitor API) or upgrade/expand the license tier","If the license was recently renewed/re-applied, re-validate it so the cached limit refreshes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// No REST pre-check exists for MAC; the closest is inspecting the license limits\n// exposed on Administration -> Info. Budget contacts before sending new ones.","typeGuard":null,"tryCatchPattern":"try {\n  await requestTranscript(rid);\n} catch (e: any) {\n  if (e?.response?.body?.error === 'error-mac-limit-reached') {\n    notifyAdmins('Monthly Active Contacts license limit reached — transcript deferred');\n    return; // do NOT retry in a tight loop; it needs a license/month change\n  }\n  throw e;\n}","preventionTips":["Monitor monthlyActiveContacts usage against the license before month-end spikes","Alert on the first mac-limit error — every subsequent new-contact action will fail too","Keep the Enterprise license validated; expired licenses flip this check on"],"tags":["livechat","transcript","licensing","enterprise","rate-limit"],"backgroundTag":"license-limit-reached","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"}