{"record":{"id":"288894938e856ba6","repo":"Tencent/WeKnora","slug":"knowledge-s-w","errorCode":null,"errorMessage":"knowledge %s: %w","messagePattern":"knowledge (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/service/knowledge_process.go","lineNumber":3964,"sourceCode":"\ntype knowledgeListReparseOutcome struct {\n\tSubmitted int\n\tFailed    int\n}\n\n// runKnowledgeListReparseSubmissions attempts every item so one bad document\n// cannot block the remainder of the batch. A partial failure is non-retryable:\n// retrying the wrapper task would destructively reparse items that were already\n// submitted successfully. Failed rows remain selectable for an explicit retry.\nfunc runKnowledgeListReparseSubmissions(\n\tids []string,\n\tsubmit func(string) error,\n) (knowledgeListReparseOutcome, error) {\n\tvar outcome knowledgeListReparseOutcome\n\tfailures := make([]error, 0)\n\tfor _, id := range ids {\n\t\tif err := submit(id); err != nil {\n\t\t\tfailures = append(failures, fmt.Errorf(\"knowledge %s: %w\", secutils.SanitizeForLog(id), err))\n\t\t\toutcome.Failed++\n\t\t\tcontinue\n\t\t}\n\t\toutcome.Submitted++\n\t}\n\tif len(failures) == 0 {\n\t\treturn outcome, nil\n\t}\n\treturn outcome, fmt.Errorf(\n\t\t\"%w: batch reparse submitted %d item(s) and failed %d: %w\",\n\t\tasynq.SkipRetry, outcome.Submitted, outcome.Failed, errors.Join(failures...),\n\t)\n}\n","sourceCodeStart":3946,"sourceCodeEnd":3978,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/service/knowledge_process.go#L3946-L3978","documentation":"Per-item wrapper inside runKnowledgeListReparseSubmissions: wraps the failure to (re)submit one knowledge ID for reparse, sanitized for logs. Each failing item is collected and the batch keeps going, so this error marks one bad row, not the whole batch.","triggerScenarios":"Thrown at internal/application/service/knowledge_process.go:3964 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the per-item wrapped error (not-found, quota, task enqueue failure)","Use CLI batch delete/reparse semantics: failures collected, exit 1 if any failed","Explicitly retry the failed IDs; successfully submitted items must not be resubmitted"],"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"}