RocketChat/Rocket.Chat · error · Error

error-mac-limit-reached

error-mac-limit-reached

Error message

error-mac-limit-reached

What it means

requestTranscript runs Omnichannel.isWithinMACLimit(room) before queueing the email; when the room's contact would push the workspace past its Monthly Active Contacts allowance (an enterprise-licensed metric), the check fails and it throws Error('error-mac-limit-reached'). The same guard exists in other omnichannel entry points (e.g. takeInquiry), so any of them can surface this code.

Solutions

  1. Check the MAC usage in Administration > Omnichannel (contacts report) for the current period
  2. Raise the limit: upgrade the license or contact sales to increase the MAC allowance
  3. Wait for the monthly window to reset if the spike is transient
  4. Audit what counts as an active contact — recurring visitors reuse the same contact and do not add to the count
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await requestTranscript({ rid, email, subject, user });
} catch (err) {
  if (err instanceof Error && err.message === 'error-mac-limit-reached') {
    // licensing limit: surface 'contact limit reached' to admins, do not retry this month
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: Requesting a transcript for a room whose visitor/contact is new this month while the workspace already reached its MAC limit for the current billing cycle.

Common situations: Workspaces on an Omnichannel license tier whose monthly active contacts cap was consumed (traffic spike, bot/campaign generating many unique visitors), or trial licenses expiring with a reduced cap.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@2a7de45707 (2026-08-18). Data as JSON: /api/errors/5ce5a85a378289fe. Report an issue: GitHub.

Appendix: source

Thrown at apps/meteor/server/lib/omnichannel/sendTranscript.ts:244

}: {
	rid: string;
	email: string;
	subject: string;
	user: AtLeast<IUser, '_id' | 'username' | 'utcOffset' | 'name'>;
}) {
	// `v` is required by the MAC-limit check below
	const room = await LivechatRooms.findOneById(rid, { projection: { _id: 1, open: 1, transcriptRequest: 1, v: 1 } });

	if (!room?.open) {
		throw new Meteor.Error('error-invalid-room', 'Invalid room');
	}

	if (room.transcriptRequest) {
		throw new Meteor.Error('error-transcript-already-requested', 'Transcript already requested');
	}

	if (!(await Omnichannel.isWithinMACLimit(room))) {
		throw new Error('error-mac-limit-reached');
	}

	const { _id, username, name, utcOffset } = user;
	const transcriptRequest = {
		requestedAt: new Date(),
		requestedBy: {
			_id,
			username,
			name,
			utcOffset,
		},
		email,
		subject,
	};

	await LivechatRooms.setEmailTranscriptRequestedByRoomId(rid, transcriptRequest);
	return true;
}

View on GitHub (pinned to 2a7de45707)