{"record":{"id":"258ffa75a5326998","repo":"RocketChat/Rocket.Chat","slug":"invalid-invitation-id","errorCode":"invalid-invitation-id","errorMessage":"Invalid Invitation _id","messagePattern":"Invalid Invitation _id","errorType":"exception","errorClass":"Meteor.Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/rooms/invites/removeInvite.ts","lineNumber":26,"sourceCode":"\tif (!userId || !invite) {\n\t\treturn false;\n\t}\n\n\tif (!(await hasPermissionAsync(userId, 'create-invite-links'))) {\n\t\tthrow new Meteor.Error('not_authorized');\n\t}\n\n\tif (!invite._id) {\n\t\tthrow new Meteor.Error('error-the-field-is-required', 'The field _id is required', {\n\t\t\tmethod: 'removeInvite',\n\t\t\tfield: '_id',\n\t\t});\n\t}\n\n\tconst { deletedCount } = await Invites.removeById(invite._id);\n\n\tif (!deletedCount) {\n\t\tthrow new Meteor.Error('invalid-invitation-id', 'Invalid Invitation _id', {\n\t\t\tmethod: 'removeInvite',\n\t\t});\n\t}\n\n\treturn true;\n};\n","sourceCodeStart":8,"sourceCodeEnd":33,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/rooms/invites/removeInvite.ts#L8-L33","documentation":"Error \"Invalid Invitation _id\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown in removeInvite when no invite record exists for the given _id.","commonSituations":"See trigger scenarios.","solutions":["Pass the _id of an existing invite record; verify the invite still exists before removal."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}