{"record":{"id":"504632705ac45ab6","repo":"Tencent/WeKnora","slug":"faq-entry-is-not-accessible-v","errorCode":null,"errorMessage":"FAQ entry is not accessible: %v","messagePattern":"FAQ entry is not accessible: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/tools/get_document_info.go","lineNumber":140,"sourceCode":"\tvar wg sync.WaitGroup\n\tvar mu sync.Mutex\n\tresults := make(map[string]*docInfo)\n\tenabled := true\n\n\tfor _, faqID := range faqIDs {\n\t\tfaqID = strings.TrimSpace(faqID)\n\t\tif faqID == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\twg.Add(1)\n\t\tgo func(id string) {\n\t\t\tdefer wg.Done()\n\t\t\tchunk, err := authorizeChunkInSearchTargets(\n\t\t\t\tctx, t.searchTargets, id, t.chunkService, t.knowledgeService,\n\t\t\t)\n\t\t\tif err != nil {\n\t\t\t\tmu.Lock()\n\t\t\t\tresults[\"faq:\"+id] = &docInfo{err: fmt.Errorf(\"FAQ entry is not accessible: %v\", err)}\n\t\t\t\tmu.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tvar meta *types.FAQChunkMetadata\n\t\t\tif chunk.ChunkType == types.ChunkTypeFAQ {\n\t\t\t\tmeta, _ = chunk.FAQMetadata()\n\t\t\t}\n\t\t\tmu.Lock()\n\t\t\tresults[\"faq:\"+id] = &docInfo{chunk: chunk, faqMeta: meta, chunkCount: 1}\n\t\t\tmu.Unlock()\n\t\t}(faqID)\n\t}\n\n\tfor _, knowledgeID := range knowledgeIDs {\n\t\twg.Add(1)\n\t\tgo func(id string) {\n\t\t\tdefer wg.Done()\n","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/tools/get_document_info.go#L122-L158","documentation":"Per-FAQ-entry authorization failed inside the concurrent worker: authorizeChunkInSearchTargets rejected the chunk ID (not found, disabled, out of KB scope, or outside @mention scope), so that FAQ entry is recorded as inaccessible in the results map rather than aborting the whole batch.","triggerScenarios":"Thrown at internal/agent/tools/get_document_info.go:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the FAQ entry exists and is enabled","Confirm its owning knowledge base is within the Agent's search targets","Report per-entry errors to the caller instead of failing the entire request"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}