{"record":{"id":"26e306ebc49812c0","repo":"RocketChat/Rocket.Chat","slug":"invalid-attachment-field-title-and-value-is-requi","errorCode":null,"errorMessage":"Invalid attachment field, title and value is required","messagePattern":"Invalid attachment field, title and value is required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/messages/sendMessage.ts","lineNumber":88,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn true;\n\t});\n\nconst validateAttachmentsFields = (attachmentField: any) => {\n\tcheck(\n\t\tattachmentField,\n\t\tobjectMaybeIncluding({\n\t\t\tshort: Boolean,\n\t\t\ttitle: String,\n\t\t\tvalue: Match.OneOf(String, Number, Boolean),\n\t\t}),\n\t);\n\n\tif (!attachmentField.value || !attachmentField.title) {\n\t\tthrow new Error('Invalid attachment field, title and value is required');\n\t}\n};\n\nconst validateAttachmentsActions = (attachmentActions: any) => {\n\tcheck(\n\t\tattachmentActions,\n\t\tobjectMaybeIncluding({\n\t\t\ttype: String,\n\t\t\ttext: String,\n\t\t\turl: validFullURLParam,\n\t\t\timage_url: validFullURLParam,\n\t\t\tis_webview: Boolean,\n\t\t\twebview_height_ratio: String,\n\t\t\tmsg: String,\n\t\t\tmsg_in_chat_window: Boolean,\n\t\t}),\n\t);\n};","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/messages/sendMessage.ts#L70-L106","documentation":"Error \"Invalid attachment field, title and value is required\" thrown in RocketChat/Rocket.Chat.","triggerScenarios":"Thrown at apps/meteor/server/lib/messages/sendMessage.ts:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure every attachment field includes both a title and a value before sending the message.","Remove attachment fields that have an empty title or value."],"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-14T05:17:10.506Z"}