{"record":{"id":"3adecc74d365a7c7","repo":"chenhg5/cc-connect","slug":"s-invalid-reply-context-type-t-3adecc","errorCode":null,"errorMessage":"%s: invalid reply context type %T","messagePattern":"(.+?): invalid reply context type %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/feishu/feishu.go","lineNumber":3205,"sourceCode":"\t\t\t\t\t*files = append(*files, core.FileAttachment{MimeType: mt, Data: fileData, FileName: fileBody.FileName})\n\t\t\t\t\tsb.WriteString(fmt.Sprintf(\"%s[%s] %s: [file: %s]\\n\", indent, ts, senderName, fileBody.FileName))\n\t\t\t\t}\n\t\t\t}\n\n\t\tcase \"merge_forward\":\n\t\t\tsb.WriteString(fmt.Sprintf(\"%s[%s] %s: [forwarded messages]\\n\", indent, ts, senderName))\n\t\t\tp.formatMergeForwardTree(msgID, childrenMap, nameMap, sb, images, files, depth+1)\n\n\t\tdefault:\n\t\t\tsb.WriteString(fmt.Sprintf(\"%s[%s] %s: [%s message]\\n\", indent, ts, senderName, msgType))\n\t\t}\n\t}\n}\n\nfunc (p *Platform) Reply(ctx context.Context, rctx any, content string) error {\n\trc, ok := rctx.(replyContext)\n\tif !ok {\n\t\treturn fmt.Errorf(\"%s: invalid reply context type %T\", p.tag(), rctx)\n\t}\n\n\tcontent = p.resolveMentionsInContent(ctx, rc.chatID, content)\n\tmsgType, msgBody := buildReplyContent(content)\n\n\tif !p.shouldUseThreadOrReplyAPI(rc) {\n\t\treturn p.sendNewMessageToChat(ctx, rc, msgType, msgBody)\n\t}\n\treturn p.replyMessage(ctx, rc, msgType, msgBody)\n}\n\n// Send sends a message. When the original message ID is available, the message\n// is sent as a reply (quoting the original) so the conversation stays threaded.\n// Falls back to creating a standalone message when no message ID exists.\nfunc (p *Platform) Send(ctx context.Context, rctx any, content string) error {\n\trc, ok := rctx.(replyContext)\n\tif !ok {\n\t\treturn fmt.Errorf(\"%s: invalid reply context type %T\", p.tag(), rctx)","sourceCodeStart":3187,"sourceCodeEnd":3223,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/feishu/feishu.go#L3187-L3223","documentation":"Feishu Reply type guard: the rctx argument is not the platform's internal replyContext struct, indicating a wiring bug or a foreign reply context (e.g. from another platform adapter). The reply is refused rather than sent to a wrong destination.","triggerScenarios":"Thrown at platform/feishu/feishu.go:3205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only pass reply contexts obtained from this platform's ReceiveMessage/ReconstructReplyCtx","Check plugin wiring for cross-platform mixing"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}