{"record":{"id":"c0a3a15aea9a58e7","repo":"Tencent/WeKnora","slug":"http-list-engines-status-d-s","errorCode":null,"errorMessage":"http list-engines status %d: %s","messagePattern":"http list-engines status (.+?): (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/infrastructure/docparser/http_parser.go","lineNumber":156,"sourceCode":"\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,\n\t\t\tAvailable:         e.Available,\n\t\t\tUnavailableReason: e.UnavailableReason,\n\t\t})\n\t}\n\treturn result, nil","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/infrastructure/docparser/http_parser.go#L138-L174","documentation":"Protocol error in HTTPDocumentReader.ListEngines: the docreader answered the list-engines request with a non-200 status. The response body is read and included (%d status, %s body) so the docreader's error detail is visible; fires when the service is up but rejects the call (auth, bad overrides, internal error).","triggerScenarios":"Thrown at internal/infrastructure/docparser/http_parser.go:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded response body for the server's reason","Check request overrides against supported engine options","Retry for 5xx; fix the 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"}