{"record":{"id":"c615a790218e4745","repo":"chenhg5/cc-connect","slug":"s-send-preview-reply-w","errorCode":null,"errorMessage":"%s: send preview (reply): %w","messagePattern":"(.+?): send preview \\(reply\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/feishu/feishu.go","lineNumber":5105,"sourceCode":"\t\t}\n\t} else {\n\t\tcardJSON = buildPreviewCardJSON(content)\n\t\tsendContent = cardJSON\n\t}\n\n\tvar msgID string\n\tif p.shouldUseThreadOrReplyAPI(rc) {\n\t\treq := larkim.NewReplyMessageReqBuilder().\n\t\t\tMessageId(rc.messageID).\n\t\t\tBody(p.buildReplyMessageReqBody(rc, larkim.MsgTypeInteractive, sendContent)).\n\t\t\tBuild()\n\t\tvar resp *larkim.ReplyMessageResp\n\t\tif err := p.withTransientRetry(ctx, \"send preview\", func() error {\n\t\t\treturn p.withFreshTenantAccessTokenRetry(ctx, \"send preview\", func(client *lark.Client, options ...larkcore.RequestOptionFunc) error {\n\t\t\t\tvar err error\n\t\t\t\tresp, err = client.Im.Message.Reply(ctx, req, options...)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"%s: send preview (reply): %w\", p.tag(), err)\n\t\t\t\t}\n\t\t\t\tif !resp.Success() {\n\t\t\t\t\treturn fmt.Errorf(\"%s: send preview (reply) code=%d msg=%s\", p.tag(), resp.Code, resp.Msg)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t})\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif resp.Data != nil && resp.Data.MessageId != nil {\n\t\t\tmsgID = *resp.Data.MessageId\n\t\t}\n\t} else {\n\t\treq := larkim.NewCreateMessageReqBuilder().\n\t\t\tReceiveIdType(larkim.ReceiveIdTypeChatId).\n\t\t\tBody(larkim.NewCreateMessageReqBodyBuilder().\n\t\t\t\tReceiveId(chatID).\n\t\t\t\tMsgType(larkim.MsgTypeInteractive).","sourceCodeStart":5087,"sourceCodeEnd":5123,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/feishu/feishu.go#L5087-L5123","documentation":"Sending a preview card via the Reply Message API failed inside the transient-retry/token-refresh wrapper in SendPreviewStart. Wraps the final Lark SDK error after retries; the preview card was not delivered as a reply.","triggerScenarios":"Thrown at platform/feishu/feishu.go:5105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rely on built-in retries; verify rc.messageID is still valid (not recalled)"],"exampleFix":null,"handlingStrategy":"retry","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"}