{"record":{"id":"5ee68332105da590","repo":"Tencent/WeKnora","slug":"weknoracloud-docreader-task-cancelled","errorCode":null,"errorMessage":"weknoracloud docreader task cancelled","messagePattern":"weknoracloud docreader task cancelled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/weknoracloud_http_reader.go","lineNumber":202,"sourceCode":"\t\t\t\tlogger.Errorf(ctx, \"[WeKnoraCloud] task_id=%s completed with result.error: %s\", taskID, res.Error)\n\t\t\t} else {\n\t\t\t\tlogger.Debugf(ctx, \"[WeKnoraCloud] task_id=%s completed ok markdownLen=%d\", taskID, len(res.MarkdownContent))\n\t\t\t}\n\t\t\treturn res, nil\n\t\tcase \"failed\":\n\t\t\tif taskResp.Error != \"\" {\n\t\t\t\tlogger.Errorf(context.Background(), \"[WeKnoraCloud] task_id=%s failed: %s\", taskID, taskResp.Error)\n\t\t\t\treturn nil, fmt.Errorf(\"weknoracloud docreader task failed: %s\", taskResp.Error)\n\t\t\t}\n\t\t\tlogger.Errorf(context.Background(), \"[WeKnoraCloud] task_id=%s failed: %s\", taskID, taskResp.Message)\n\t\t\treturn nil, fmt.Errorf(\"weknoracloud docreader task failed: %s\", taskResp.Message)\n\t\tcase \"cancelled\":\n\t\t\tif taskResp.Error != \"\" {\n\t\t\t\tlogger.Errorf(context.Background(), \"[WeKnoraCloud] task_id=%s cancelled: %s\", taskID, taskResp.Error)\n\t\t\t\treturn nil, fmt.Errorf(\"weknoracloud docreader task cancelled: %s\", taskResp.Error)\n\t\t\t}\n\t\t\tlogger.Errorf(context.Background(), \"[WeKnoraCloud] task_id=%s cancelled\", taskID)\n\t\t\treturn nil, fmt.Errorf(\"weknoracloud docreader task cancelled\")\n\t\t}\n\t\tif err := pollCtx.Err(); err != nil {\n\t\t\tlogger.Errorf(ctx, \"[WeKnoraCloud] poll task_id=%s aborted before sleep: %v\", taskID, err)\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// Exponential backoff: multiply by 1.5 each time, cap at maxPollInterval\n\t\tselect {\n\t\tcase <-pollCtx.Done():\n\t\t\tlogger.Errorf(ctx, \"[WeKnoraCloud] poll task_id=%s stopped: %v\", taskID, pollCtx.Err())\n\t\t\treturn nil, pollCtx.Err()\n\t\tcase <-time.After(currentInterval):\n\t\t\t// Update interval for next iteration\n\t\t\tnextInterval := time.Duration(float64(currentInterval) * 1.5)\n\t\t\tif nextInterval > p.maxPollInterval {\n\t\t\t\tnextInterval = p.maxPollInterval\n\t\t\t}\n\t\t\tcurrentInterval = nextInterval","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/weknoracloud_http_reader.go#L184-L220","documentation":"Fired in pollTaskResult when the task reports status \"cancelled\" but carries no error detail — a generic sentinel message meaning the remote read task was cancelled server-side without an explanation.","triggerScenarios":"Thrown at internal/infrastructure/docparser/weknoracloud_http_reader.go:202 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resubmit the read request if cancellation was unintended","Check service logs on the WeKnoraCloud side for the task_id","Look for quota or lifecycle policies that cancel tasks"],"exampleFix":null,"handlingStrategy":"fallback","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"}