{"record":{"id":"4d2f73f34604415c","repo":"Tencent/WeKnora","slug":"paddleocr-vl-cloud-poll-w","errorCode":null,"errorMessage":"PaddleOCR-VL Cloud poll: %w","messagePattern":"PaddleOCR-VL Cloud poll: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go","lineNumber":73,"sourceCode":"\t\treturn &types.ReadResult{Error: fmt.Sprintf(\"PaddleOCR-VL Cloud base URL blocked by SSRF policy: %v\", err)}, nil\n\t}\n\n\tcontent := req.FileContent\n\tif len(content) == 0 {\n\t\treturn &types.ReadResult{Error: \"no file content provided\"}, nil\n\t}\n\n\tlogger.Infof(context.Background(), \"[PaddleOCR-VL Cloud] Parsing file=%s size=%d model=%s\",\n\t\treq.FileName, len(content), c.model)\n\n\tjobID, err := c.submitJob(ctx, req, content)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"PaddleOCR-VL Cloud submit: %w\", err)\n\t}\n\n\tjsonlURL, err := c.pollJob(ctx, jobID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"PaddleOCR-VL Cloud poll: %w\", err)\n\t}\n\n\tmdContent, imagesURL, err := c.fetchResults(jsonlURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"PaddleOCR-VL Cloud fetch results: %w\", err)\n\t}\n\n\tmdContent = normalizeHTMLTables(mdContent)\n\n\timageRefs := c.downloadImages(mdContent, imagesURL)\n\tmdContent, imageRefs = ensureOriginalImageRef(req, mdContent, imageRefs)\n\n\tlogger.Infof(context.Background(), \"[PaddleOCR-VL Cloud] Parsed successfully, markdown=%d chars, images=%d\",\n\t\tlen(mdContent), len(imageRefs))\n\n\treturn &types.ReadResult{\n\t\tMarkdownContent: mdContent,\n\t\tImageRefs:       imageRefs,","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go#L55-L91","documentation":"After a successful submit, Read polls the PaddleOCR-VL Cloud job until the result JSONL URL is available. If pollJob fails — HTTP errors while checking status, job failure reported by the API, or the polling deadline/context expiring — the error is wrapped as 'PaddleOCR-VL Cloud poll'. The document was accepted but the asynchronous job did not produce a usable result URL in time.","triggerScenarios":"Read -> pollJob returns error: job status endpoint returns non-200, job transitions to a failed state, all poll attempts time out before completion, or ctx is cancelled.","commonSituations":"Very large/multi-page documents exceeding the poll window; PaddleOCR cloud outage or degraded service; invalid job ID handling after submit returned an unexpected shape; rate limiting on status checks.","solutions":["Check the wrapped cause for whether the job explicitly failed vs. timed out","If timeout, increase poll interval/deadline or process smaller documents","Log the job ID and check its status directly against the PaddleOCR-VL cloud console/API","Retry the whole Read on transient cloud errors","Verify service status/quota of your PaddleOCR-VL cloud account"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"ctx, cancel := context.WithTimeout(ctx, 10*time.Minute) // allow long jobs\ndefer cancel()","typeGuard":"func isPollFailure(err error) bool {\n    return err != nil && strings.Contains(err.Error(), \"PaddleOCR-VL Cloud poll\")\n}","tryCatchPattern":"out, err := reader.Read(ctx, req)\nif isPollFailure(err) && errors.Is(err, context.DeadlineExceeded) {\n    return fmt.Errorf(\"job %s still running; resume or re-poll later\", jobID)\n}","preventionTips":["Size the poll window to document complexity (large docs need minutes)","Log the job ID so failed polls can be checked manually","Use exponential backoff on status checks to avoid rate limits","Distinguish hard job failures (do not retry) from timeouts (retry/resume)"],"tags":["async","polling","cloud-api","paddleocr","timeout"],"backgroundTag":"async-job-poll-timeout","analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}