{"record":{"id":"bb5afb2049efcb70","repo":"Tencent/WeKnora","slug":"api-status-d-s-bb5afb","errorCode":null,"errorMessage":"API status %d: %s","messagePattern":"API status (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go","lineNumber":154,"sourceCode":"\twriter.Close()\n\n\thttpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, c.baseURL, &body)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"create request: %w\", err)\n\t}\n\thttpReq.Header.Set(\"Authorization\", \"bearer \"+c.token)\n\thttpReq.Header.Set(\"Content-Type\", writer.FormDataContentType())\n\n\tclient := utils.NewSSRFSafeHTTPClient(utils.SSRFSafeHTTPClientConfig{Timeout: 60 * time.Second, MaxRedirects: 5})\n\tresp, err := client.Do(httpReq)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"HTTP request: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\trespBody, _ := io.ReadAll(resp.Body)\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn \"\", fmt.Errorf(\"API status %d: %s\", resp.StatusCode, string(respBody))\n\t}\n\n\tvar result paddleOCRVLCloudSubmitResponse\n\tif err := json.Unmarshal(respBody, &result); err != nil {\n\t\treturn \"\", fmt.Errorf(\"decode response: %w\", err)\n\t}\n\tif result.Data.JobID == \"\" {\n\t\treturn \"\", fmt.Errorf(\"API returned no jobId: %s\", string(respBody))\n\t}\n\n\tlogger.Infof(context.Background(), \"[PaddleOCR-VL Cloud] job submitted: jobId=%s\", result.Data.JobID)\n\treturn result.Data.JobID, nil\n}\n\n// --- polling ---\n\ntype paddleOCRVLCloudPollResponse struct {\n\tData struct {","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go#L136-L172","documentation":"Protocol error in PaddleOCRVLCloudReader.submitJob: the OCR submission endpoint returned a non-200 status. The full response body was read and is embedded (%d status, %s body) so the service's error explanation is visible; fires when the endpoint is reachable but rejects the job submission.","triggerScenarios":"Thrown at internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the embedded body for the server's reason","Verify the bearer token and file constraints","Retry for 5xx; fix auth/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"}