Tencent/WeKnora · error
knowledge %s: %w
Error message
knowledge %s: %w
What it means
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.
Source
Thrown at internal/application/service/knowledge_process.go:3964
type knowledgeListReparseOutcome struct {
Submitted int
Failed int
}
// runKnowledgeListReparseSubmissions attempts every item so one bad document
// cannot block the remainder of the batch. A partial failure is non-retryable:
// retrying the wrapper task would destructively reparse items that were already
// submitted successfully. Failed rows remain selectable for an explicit retry.
func runKnowledgeListReparseSubmissions(
ids []string,
submit func(string) error,
) (knowledgeListReparseOutcome, error) {
var outcome knowledgeListReparseOutcome
failures := make([]error, 0)
for _, id := range ids {
if err := submit(id); err != nil {
failures = append(failures, fmt.Errorf("knowledge %s: %w", secutils.SanitizeForLog(id), err))
outcome.Failed++
continue
}
outcome.Submitted++
}
if len(failures) == 0 {
return outcome, nil
}
return outcome, fmt.Errorf(
"%w: batch reparse submitted %d item(s) and failed %d: %w",
asynq.SkipRetry, outcome.Submitted, outcome.Failed, errors.Join(failures...),
)
}
View on GitHub (pinned to 988cbb0330)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/application/service/knowledge_process.go:3964 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/288894938e856ba6.
Report an issue: GitHub.