{"record":{"id":"b3d51691c12ebccf","repo":"RocketChat/Rocket.Chat","slug":"missing-roomid","errorCode":null,"errorMessage":"missing-roomId","messagePattern":"missing-roomId","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/services/team/service.ts","lineNumber":376,"sourceCode":"\n\t\t\tif (room.t === 'c') {\n\t\t\t\tawait Message.saveSystemMessage('user-added-room-to-team', team.roomId, room.name || '', user);\n\t\t\t}\n\n\t\t\troom.teamId = teamId;\n\t\t}\n\n\t\tawait Rooms.setTeamByIds(rids, teamId);\n\t\tvoid notifyOnRoomChangedById(rids, 'updated');\n\t\treturn validRooms;\n\t}\n\n\tasync removeRoom(uid: string, rid: string, teamId: string, canRemoveAnyRoom = false): Promise<IRoom> {\n\t\tif (!teamId) {\n\t\t\tthrow new Error('missing-teamId');\n\t\t}\n\t\tif (!rid) {\n\t\t\tthrow new Error('missing-roomId');\n\t\t}\n\t\tif (!uid) {\n\t\t\tthrow new Error('missing-userId');\n\t\t}\n\n\t\tconst room = await Rooms.findOneById(rid);\n\t\tif (!room) {\n\t\t\tthrow new Error('invalid-room');\n\t\t}\n\n\t\tconst user = await Users.findOneById(uid);\n\t\tif (!user) {\n\t\t\tthrow new Error('invalid-user');\n\t\t}\n\t\tif (!canRemoveAnyRoom) {\n\t\t\tconst canSeeRoom = await Authorization.canAccessRoom(room, user);\n\t\t\tif (!canSeeRoom) {\n\t\t\t\tthrow new Error('invalid-room');","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/e4b8178b205510181a96ceefee043d0abcd13e5a/apps/meteor/server/services/team/service.ts#L358-L394","documentation":"Error \"missing-roomId\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown at apps/meteor/server/services/team/service.ts:374 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a valid room id (rid) when calling TeamService.removeRoom.","Verify the request body includes the roomId field before submitting."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4b8178b205510181a96ceefee043d0abcd13e5a","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}