{"record":{"id":"000994009c571b42","repo":"Tencent/WeKnora","slug":"w-batch-reparse-submitted-d-item-s-and-failed","errorCode":null,"errorMessage":"%w: batch reparse submitted %d item(s) and failed %d: %w","messagePattern":"%w: batch reparse submitted (.+?) item\\(s\\) and failed (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/service/knowledge_process.go","lineNumber":3973,"sourceCode":"// 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":3955,"sourceCodeEnd":3978,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/service/knowledge_process.go#L3955-L3978","documentation":"Terminal aggregate error returned by runKnowledgeListReparseSubmissions when some batch items failed to submit: reports both submitted and failed counts plus the joined per-item errors. Deliberately non-retryable — retrying the wrapper would destructively reparse already-submitted items; failed rows remain selectable for an explicit retry.","triggerScenarios":"Thrown at internal/application/service/knowledge_process.go:3973 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the joined errors to identify which IDs failed","Retry only the failed IDs explicitly, never the whole batch","Treat partial success as final for this run (exit 1 if any failed, per CLI semantics)"],"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"}