{"record":{"id":"c1ab55624eedeed0","repo":"RocketChat/Rocket.Chat","slug":"error-team-creation","errorCode":null,"errorMessage":"error-team-creation","messagePattern":"error-team-creation","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/services/team/service.ts","lineNumber":138,"sourceCode":"\n\t\t\tawait TeamMember.insertMany(membersList);\n\n\t\t\tawait Rooms.setTeamMainById(roomId, teamId);\n\t\t\tawait Team.updateMainRoomForTeam(teamId, roomId);\n\t\t\tteamData.roomId = roomId;\n\n\t\t\tif (room.id) {\n\t\t\t\tawait Message.saveSystemMessage('user-converted-to-team', roomId, team.name, createdBy);\n\t\t\t}\n\n\t\t\tvoid notifyOnRoomChangedById(roomId, 'inserted');\n\n\t\t\treturn {\n\t\t\t\t_id: teamId,\n\t\t\t\t...teamData,\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tthrow new Error('error-team-creation');\n\t\t}\n\t}\n\n\tasync update(uid: string, teamId: string, updateData: ITeamUpdateData): Promise<void> {\n\t\tconst team = await Team.findOneById<Pick<ITeam, '_id' | 'roomId'>>(teamId, {\n\t\t\tprojection: { roomId: 1 },\n\t\t});\n\t\tif (!team) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst user = await Users.findOneById(uid);\n\t\tif (!user) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { name, type, updateRoom = true } = updateData;\n","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/e4b8178b205510181a96ceefee043d0abcd13e5a/apps/meteor/server/services/team/service.ts#L120-L156","documentation":"Error \"error-team-creation\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown at apps/meteor/server/services/team/service.ts:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the server logs for the original exception caught in TeamService.create; the generic 'error-team-creation' masks the underlying cause.","Verify the team name is unique and the user creating the team has the required permissions.","Ensure the room being converted to a team is valid and not already part of another team."],"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"}