{"record":{"id":"047f4f12b8ffbb6a","repo":"Tencent/WeKnora","slug":"http-list-engines-failed-w","errorCode":null,"errorMessage":"http list-engines failed: %w","messagePattern":"http list-engines failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/http_parser.go","lineNumber":151,"sourceCode":"\tif err := secutils.ValidateURLForSSRF(base); err != nil {\n\t\treturn nil, fmt.Errorf(\"docreader address failed SSRF validation: %w\", err)\n\t}\n\n\tbody := httpListEnginesRequest{ConfigOverrides: overrides}\n\tjsonBody, err := json.Marshal(body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"http marshal list-engines request: %w\", err)\n\t}\n\n\thttpReq, err := http.NewRequestWithContext(ctx, http.MethodPost, base+PathListEngines, bytes.NewReader(jsonBody))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"http new request: %w\", err)\n\t}\n\thttpReq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := p.client.Do(httpReq)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"http list-engines failed: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != http.StatusOK {\n\t\trespBytes, _ := io.ReadAll(resp.Body)\n\t\treturn nil, fmt.Errorf(\"http list-engines status %d: %s\", resp.StatusCode, string(respBytes))\n\t}\n\n\tvar out httpListEnginesResponse\n\tif err := json.NewDecoder(resp.Body).Decode(&out); err != nil {\n\t\treturn nil, fmt.Errorf(\"http decode list-engines response: %w\", err)\n\t}\n\n\tresult := make([]types.ParserEngineInfo, 0, len(out.Engines))\n\tfor _, e := range out.Engines {\n\t\tresult = append(result, types.ParserEngineInfo{\n\t\t\tName:              e.Name,\n\t\t\tDescription:       e.Description,\n\t\t\tFileTypes:         e.FileTypes,","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/http_parser.go#L133-L169","documentation":"Transport error in HTTPDocumentReader.ListEngines: the HTTP client's Do() for the list-engines POST failed (connection refused, timeout, DNS). The %w wraps the network-level error so the docreader outage cause stays visible; it is raised before the status-code check distinguishes non-200 responses.","triggerScenarios":"Thrown at internal/infrastructure/docparser/http_parser.go:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the docreader service is running and reachable","Check address, DNS, and TLS configuration","Retry once the service is available"],"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"}