RocketChat/Rocket.Chat · error · Meteor.Error
error-room-archived
error-room-archived
Error message
The private group, ${roomName}, is archived What it means
Thrown by findPrivateGroupByIdOrName (default checkedArchived=true) when the resolved private group has archived=true. Mutating group endpoints routed through this helper - groups.addAll, addModerator/kick/roles, etc. - refuse to operate on archived groups, since an archived room is meant to be frozen read-only. Read-only endpoints such as groups.info call the helper with checkedArchived:false and do not hit this.
Solutions
- Unarchive first with POST groups.unarchive { roomId }, then replay the original mutation
- Skip archived rooms in automation by checking the archived flag from rooms/info or groups.list before acting
- If the archive is intentional, treat this as the expected terminal state and stop the workflow for that room
Example fix
// before
await sdk.post('groups.addAll', { roomId }); // group is archived
// after
await sdk.post('groups.unarchive', { roomId });
await sdk.post('groups.addAll', { roomId }); Defensive patterns
Strategy: validation
Validate before calling
const { group } = await sdk.get('groups.info', { roomId });
if (group.archived) {
await sdk.post('groups.unarchive', { roomId }); // only if reactivation is intended
} Type guard
const isArchived = (room: { archived?: boolean }): boolean => Boolean(room.archived); Try / catch
try { await sdk.post('groups.addAll', { roomId }); } catch (e) {
if (e.error === 'error-room-archived') { /* decide: unarchive-and-retry, or stop the workflow */ }
} Prevention
- Check the archived flag from groups.info/groups.list before mutating
- Automations should treat archived as a terminal state unless a business rule says otherwise
- Pair unarchive -> mutate -> archive sequences explicitly rather than assuming liveness
When it happens
Trigger: POST groups.addAll or groups.addModerator against a group that an admin archived earlier; retrying an old automation payload after the workspace did a cleanup/archive sweep; the group being archived by another process between your rooms/info check and your mutation call.
Common situations: Compliance-driven archiving of old project groups while scheduled bots keep posting/inviting; migration scripts that assume all listed groups are active; admins testing archive behavior and forgetting to restore.
Related errors
- error-empty-invite-list
- error-invalid-room
- error-not-allowed
- error-room-not-found
- error-room-param-not-provided
AI-assisted analysis of RocketChat/Rocket.Chat@e4b8178b20 (2026-08-18).
Data as JSON: /api/errors/1fce44efe5615d32.
Report an issue: GitHub.
Appendix: source
Thrown at apps/meteor/server/api/v1/groups.ts:141
open: boolean;
ro: boolean;
t: string;
name: string;
broadcast: boolean;
}> {
const room = await getRoomFromParams(params);
const user = await Users.findOneById(userId, { projection: { username: 1, roles: 1, abacAttributes: 1 } });
if (!room || !user || !(await canAccessRoomAsync(room, user))) {
throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any group');
}
// discussions have their names saved on `fname` property
const roomName = room.prid ? room.fname : room.name;
if (checkedArchived && room.archived) {
throw new Meteor.Error('error-room-archived', `The private group, ${roomName}, is archived`);
}
const sub = await Subscriptions.findOneByRoomIdAndUserId(room._id, userId, { projection: { open: 1 } });
return {
rid: room._id,
open: Boolean(sub?.open),
ro: Boolean(room.ro),
t: room.t,
name: roomName ?? '',
broadcast: Boolean(room.broadcast),
};
}
const groupResponseSchema = ajv.compile<{ group: IRoom }>({
type: 'object',
properties: {
group: { $ref: '#/components/schemas/IRoom' },View on GitHub (pinned to e4b8178b20)