Tencent/WeKnora · error
weknoracloud docreader task failed: %s
Error message
weknoracloud docreader task failed: %s
What it means
Fired in pollTaskResult when the async task reports status "failed" with a non-empty Error field. The remote document reader itself failed to process the file (unsupported format, corrupt content, internal reader error); the message carries the server-side error text.
Source
Thrown at internal/infrastructure/docparser/weknoracloud_http_reader.go:192
return nil, err
}
switch taskResp.Status {
case "completed":
if taskResp.Result == nil {
logger.Infof(ctx, "[WeKnoraCloud] task_id=%s completed with no result payload", taskID)
return &types.ReadResult{}, nil
}
res := fromHTTPReadResponse(taskResp.Result)
if res.Error != "" {
logger.Errorf(ctx, "[WeKnoraCloud] task_id=%s completed with result.error: %s", taskID, res.Error)
} else {
logger.Debugf(ctx, "[WeKnoraCloud] task_id=%s completed ok markdownLen=%d", taskID, len(res.MarkdownContent))
}
return res, nil
case "failed":
if taskResp.Error != "" {
logger.Errorf(context.Background(), "[WeKnoraCloud] task_id=%s failed: %s", taskID, taskResp.Error)
return nil, fmt.Errorf("weknoracloud docreader task failed: %s", taskResp.Error)
}
logger.Errorf(context.Background(), "[WeKnoraCloud] task_id=%s failed: %s", taskID, taskResp.Message)
return nil, fmt.Errorf("weknoracloud docreader task failed: %s", taskResp.Message)
case "cancelled":
if taskResp.Error != "" {
logger.Errorf(context.Background(), "[WeKnoraCloud] task_id=%s cancelled: %s", taskID, taskResp.Error)
return nil, fmt.Errorf("weknoracloud docreader task cancelled: %s", taskResp.Error)
}
logger.Errorf(context.Background(), "[WeKnoraCloud] task_id=%s cancelled", taskID)
return nil, fmt.Errorf("weknoracloud docreader task cancelled")
}
if err := pollCtx.Err(); err != nil {
logger.Errorf(ctx, "[WeKnoraCloud] poll task_id=%s aborted before sleep: %v", taskID, err)
return nil, err
}
// Exponential backoff: multiply by 1.5 each time, cap at maxPollInterval
select {View on GitHub (pinned to 988cbb0330)
Solutions
- Read the embedded task error to learn why the reader failed
- Verify the file format is supported and the content is not corrupt
- Adjust ParserEngine/ParserEngineOverrides if the engine rejected the file
- Resubmit the read after fixing the input; do not retry blindly
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at internal/infrastructure/docparser/weknoracloud_http_reader.go:192 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/65ee4f09980e7ba7.
Report an issue: GitHub.