{"record":{"id":"ce969dfae55396ec","repo":"Tencent/WeKnora","slug":"http-request-w-ce969d","errorCode":null,"errorMessage":"HTTP request: %w","messagePattern":"HTTP request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go","lineNumber":148,"sourceCode":"\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"create form file: %w\", err)\n\t}\n\tif _, err := part.Write(content); err != nil {\n\t\treturn \"\", fmt.Errorf(\"write file content: %w\", err)\n\t}\n\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","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go#L130-L166","documentation":"Transport error in PaddleOCRVLCloudReader.submitJob: the SSRF-safe HTTP client's Do() for the multipart form POST failed at the network level. The %w wraps the underlying net error; fires after the form was built and the request signed, before status/response handling.","triggerScenarios":"Thrown at internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check reachability of the configured PaddleOCR-VL Cloud URL","Retry; large multipart uploads may need longer timeouts","Verify token and endpoint configuration"],"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"}