Tencent/WeKnora · error
weknoracloud docreader task cancelled: %s
Error message
weknoracloud docreader task cancelled: %s
What it means
Fired in pollTaskResult when the task reports status "cancelled" with a non-empty detail string. The remote read task was cancelled server-side (e.g. by an admin, quota policy, or upstream cancellation), so no result will ever be produced.
Source
Thrown at internal/infrastructure/docparser/weknoracloud_http_reader.go:199
}
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 {
case <-pollCtx.Done():
logger.Errorf(ctx, "[WeKnoraCloud] poll task_id=%s stopped: %v", taskID, pollCtx.Err())
return nil, pollCtx.Err()
case <-time.After(currentInterval):
// Update interval for next iteration
nextInterval := time.Duration(float64(currentInterval) * 1.5)
if nextInterval > p.maxPollInterval {View on GitHub (pinned to 988cbb0330)
Solutions
- Use the embedded detail to learn why the task was cancelled
- Resubmit the read request if cancellation was unintended
- Check tenant quota/policy that may auto-cancel tasks
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at internal/infrastructure/docparser/weknoracloud_http_reader.go:199 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/e562224177e81891.
Report an issue: GitHub.