Tencent/WeKnora · error
HTTP request: %w
Error message
HTTP request: %w
What it means
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.
Source
Thrown at internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go:148
if err != nil {
return "", fmt.Errorf("create form file: %w", err)
}
if _, err := part.Write(content); err != nil {
return "", fmt.Errorf("write file content: %w", err)
}
writer.Close()
httpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, c.baseURL, &body)
if err != nil {
return "", fmt.Errorf("create request: %w", err)
}
httpReq.Header.Set("Authorization", "bearer "+c.token)
httpReq.Header.Set("Content-Type", writer.FormDataContentType())
client := utils.NewSSRFSafeHTTPClient(utils.SSRFSafeHTTPClientConfig{Timeout: 60 * time.Second, MaxRedirects: 5})
resp, err := client.Do(httpReq)
if err != nil {
return "", fmt.Errorf("HTTP request: %w", err)
}
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
if resp.StatusCode != http.StatusOK {
return "", fmt.Errorf("API status %d: %s", resp.StatusCode, string(respBody))
}
var result paddleOCRVLCloudSubmitResponse
if err := json.Unmarshal(respBody, &result); err != nil {
return "", fmt.Errorf("decode response: %w", err)
}
if result.Data.JobID == "" {
return "", fmt.Errorf("API returned no jobId: %s", string(respBody))
}
logger.Infof(context.Background(), "[PaddleOCR-VL Cloud] job submitted: jobId=%s", result.Data.JobID)
return result.Data.JobID, nilView on GitHub (pinned to 988cbb0330)
Solutions
- Check reachability of the configured PaddleOCR-VL Cloud URL
- Retry; large multipart uploads may need longer timeouts
- Verify token and endpoint configuration
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/infrastructure/docparser/paddleocr_vl_cloud_converter.go:148 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/ce969dfae55396ec.
Report an issue: GitHub.