{"record":{"id":"6aa5740235b0b54c","repo":"Tencent/WeKnora","slug":"api-returned-no-jobid-s","errorCode":null,"errorMessage":"API returned no jobId: %s","messagePattern":"API returned no jobId: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go","lineNumber":162,"sourceCode":"\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 {\n\t\tState           string `json:\"state\"`\n\t\tErrorMsg        string `json:\"errorMsg\"`\n\t\tExtractProgress struct {\n\t\t\tTotalPages     int `json:\"totalPages\"`\n\t\t\tExtractedPages int `json:\"extractedPages\"`\n\t\t} `json:\"extractProgress\"`\n\t\tResultURL struct {\n\t\t\tJSONURL string `json:\"jsonUrl\"`","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go#L144-L180","documentation":"Guard in submitJob: PaddleOCR-VL Cloud returned a valid response but Data.JobID is empty, so there is no job to poll — a contract violation or silent server-side rejection, with the raw body embedded for diagnosis.","triggerScenarios":"Thrown at internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the embedded response for hints of rejection","Retry the submission once","Verify request parameters against current API docs"],"exampleFix":null,"handlingStrategy":"validation","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"}