{"record":{"id":"0e75e9d9258f034d","repo":"RocketChat/Rocket.Chat","slug":"unhandled-trigger-event","errorCode":null,"errorMessage":"Unhandled trigger event","messagePattern":"Unhandled trigger event","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/integrations/lib/triggerHandler.ts","lineNumber":236,"sourceCode":"\t\t\tcase 'roomJoined':\n\t\t\t\tif (args.length >= 3) {\n\t\t\t\t\targObject.user = args[1] as IUser;\n\t\t\t\t\targObject.room = args[2] as IRoom;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'roomLeft':\n\t\t\t\tif (args.length >= 3) {\n\t\t\t\t\targObject.user = (args[1] as { user: IUser })?.user;\n\t\t\t\t\targObject.room = args[2] as IRoom;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'userCreated':\n\t\t\t\tif (args.length >= 2) {\n\t\t\t\t\targObject.user = args[1] as IUser;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\toutgoingLogger.warn({ msg: 'Unhandled trigger event', event: argObject.event });\n\t\t\t\targObject.event = undefined;\n\t\t\t\tbreak;\n\t\t}\n\n\t\toutgoingLogger.debug({\n\t\t\tmsg: 'Got the event arguments for the event',\n\t\t\tevent: argObject.event,\n\t\t\tmessageId: argObject.message?._id,\n\t\t\troomId: argObject.room?._id,\n\t\t\tuserId: argObject.user?._id || argObject.owner?._id,\n\t\t});\n\n\t\treturn argObject;\n\t}\n\n\tmapEventArgsToData(data: IntegrationData, { event, message, room, owner, user }: ArgumentsObject) {\n\t\t/* The \"services\" field contains sensitive information such as\n\t\tthe user's password hash. To prevent this information from being","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/integrations/lib/triggerHandler.ts#L218-L254","documentation":"executeTriggers maps emitted event names to argument objects through a fixed switch covering exactly sendMessage, fileUploaded, roomArchived, roomCreated, roomJoined, roomLeft and userCreated. Any other event name hits the default branch: warn, event set to undefined, and executeTriggers returns immediately - no integrations run for that emission.","triggerScenarios":"Custom server code calling the integration handler's executeTriggers with a new or misspelled event name ('RoomJoined', 'roomEdited'); version skew where a caller emits an event the handler version does not know; plugins introducing events without extending this switch.","commonSituations":"Fork/custom deployments emitting bespoke events; partial upgrades leaving emit sites and the handler out of sync; copy-paste typos in event names.","solutions":["Use one of the seven supported event names, exactly spelled and case-sensitive","If a custom event is required, extend eventNameArgumentsToObject's switch in your fork","Cross-check what each event supports against outgoingEvents (app/integrations/lib/outgoingEvents.ts)","Look for the paired 'Execute Trigger:' debug line to see the raw first argument actually received"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"const SUPPORTED_EVENTS = new Set(['sendMessage', 'fileUploaded', 'roomArchived', 'roomCreated', 'roomJoined', 'roomLeft', 'userCreated']);\nif (!SUPPORTED_EVENTS.has(eventName)) {\n  logger.warn({ msg: 'refusing to emit unsupported integration event', eventName });\n}","typeGuard":"const isSupportedOutgoingEvent = (\n  e: unknown,\n): e is 'sendMessage' | 'fileUploaded' | 'roomArchived' | 'roomCreated' | 'roomJoined' | 'roomLeft' | 'userCreated' =>\n  typeof e === 'string' && SUPPORTED_EVENTS.has(e);","tryCatchPattern":null,"preventionTips":["Derive the event list from outgoingEvents rather than hardcoding guesses","Type emission calls with OutgoingIntegrationEvent so typos fail at compile time","Watch for this warn after upgrades - new events in callers may not be handled by the installed handler"],"tags":["integrations","outgoing-webhook","events"],"backgroundTag":"unsupported-event-type","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"}