{"record":{"id":"e562224177e81891","repo":"Tencent/WeKnora","slug":"weknoracloud-docreader-task-cancelled-s","errorCode":null,"errorMessage":"weknoracloud docreader task cancelled: %s","messagePattern":"weknoracloud docreader task cancelled: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/weknoracloud_http_reader.go","lineNumber":199,"sourceCode":"\t\t\t}\n\t\t\tres := fromHTTPReadResponse(taskResp.Result)\n\t\t\tif res.Error != \"\" {\n\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 {","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/weknoracloud_http_reader.go#L181-L217","documentation":"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.","triggerScenarios":"Thrown at internal/infrastructure/docparser/weknoracloud_http_reader.go:199 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"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"}