{"record":{"id":"12dd108bd359343b","repo":"chenhg5/cc-connect","slug":"s-list-chat-members-w","errorCode":null,"errorMessage":"%s: list chat members: %w","messagePattern":"(.+?): list chat members: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/feishu/feishu.go","lineNumber":2264,"sourceCode":"func (p *Platform) fetchChatMembers(ctx context.Context, chatID string) (map[string]string, error) {\n\tif p.client == nil {\n\t\treturn nil, fmt.Errorf(\"%s: client not initialized\", p.tag())\n\t}\n\tmembers := make(map[string]string)\n\treq := larkim.NewGetChatMembersReqBuilder().\n\t\tChatId(chatID).\n\t\tMemberIdType(\"open_id\").\n\t\tPageSize(100).\n\t\tBuild()\n\ttimeoutCtx, cancel := context.WithTimeout(ctx, 10*time.Second)\n\tdefer cancel()\n\ttoken, err := p.fetchFreshTenantAccessToken(timeoutCtx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: fetch tenant token for chat members: %w\", p.tag(), err)\n\t}\n\titer, err := p.client.Im.ChatMembers.GetByIterator(timeoutCtx, req, larkcore.WithTenantAccessToken(token))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s: list chat members: %w\", p.tag(), err)\n\t}\n\tfor {\n\t\thasMore, member, err := iter.Next()\n\t\tif err != nil {\n\t\t\tslog.Debug(p.tag()+\": fetch chat members page error\", \"chat_id\", chatID, \"error\", err)\n\t\t\tbreak\n\t\t}\n\t\tif member != nil && member.Name != nil && member.MemberId != nil {\n\t\t\tname := *member.Name\n\t\t\tif _, exists := members[name]; !exists {\n\t\t\t\tmembers[name] = *member.MemberId\n\t\t\t} else {\n\t\t\t\tmembers[name] = \"\"\n\t\t\t}\n\t\t}\n\t\tif !hasMore {\n\t\t\tbreak\n\t\t}","sourceCodeStart":2246,"sourceCodeEnd":2282,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/feishu/feishu.go#L2246-L2282","documentation":"The Lark GetChatMembers API call inside fetchChatMembers failed (transport or wrapped API error) while resolving the chat's member name/open_id map. Wraps the underlying error after token acquisition succeeded.","triggerScenarios":"Thrown at platform/feishu/feishu.go:2264 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the bot is in the chat and has member-read permission","Check Feishu rate limits if failures repeat"],"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"}