{"record":{"id":"733b0c691809a13a","repo":"Tencent/WeKnora","slug":"paddleocr-vl-api-status-d-s","errorCode":null,"errorMessage":"PaddleOCR-VL API status %d: %s","messagePattern":"PaddleOCR-VL API status (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/paddleocr_vl_converter.go","lineNumber":179,"sourceCode":"\thttpReq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tclient := utils.NewSSRFSafeHTTPClient(utils.SSRFSafeHTTPClientConfig{\n\t\tTimeout:      paddleOCRVLTimeout,\n\t\tMaxRedirects: 5,\n\t})\n\tresp, err := client.Do(httpReq)\n\tif err != nil {\n\t\treturn \"\", nil, fmt.Errorf(\"HTTP request: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\trespBody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn \"\", nil, fmt.Errorf(\"read response body: %w\", err)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn \"\", nil, fmt.Errorf(\"PaddleOCR-VL API status %d: %s\", resp.StatusCode, string(respBody))\n\t}\n\n\tvar result paddleOCRVLResponse\n\tif err := json.Unmarshal(respBody, &result); err != nil {\n\t\treturn \"\", nil, fmt.Errorf(\"decode response: %w\", err)\n\t}\n\tif result.ErrorCode != 0 {\n\t\treturn \"\", nil, fmt.Errorf(\"PaddleOCR-VL error %d: %s\", result.ErrorCode, result.ErrorMsg)\n\t}\n\n\tpages := result.Result.LayoutParsingResults\n\tif len(pages) == 0 {\n\t\tlogger.Errorf(context.Background(), \"[PaddleOCR-VL] response has no layoutParsingResults\")\n\t\treturn \"\", nil, nil\n\t}\n\n\t// Merge per-page markdown and image dicts into one document.\n\ttexts := make([]string, 0, len(pages))","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/paddleocr_vl_converter.go#L161-L197","documentation":"Protocol error in PaddleOCRVLReader.callLayoutParsing: the layout-parsing endpoint answered with a non-200 status. The response body already read is embedded (%d status, %s body) to surface the OCR service's error detail; fires when the service is reachable but rejects the recognition request.","triggerScenarios":"Thrown at internal/infrastructure/docparser/paddleocr_vl_converter.go:179 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded body for the server's reason","Verify file size/type constraints and auth","Retry for 5xx; fix the request for 4xx"],"exampleFix":null,"handlingStrategy":"retry","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"}