{"record":{"id":"7417eabc6dc6fd06","repo":"router-for-me/CLIProxyAPI","slug":"create-host-http-request-w","errorCode":null,"errorMessage":"create host http request: %w","messagePattern":"create host http request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pluginhost/http_bridge.go","lineNumber":122,"sourceCode":"\t\tChunks:     chunks,\n\t}, nil\n}\n\nfunc (c *hostHTTPClient) doHTTP(ctx context.Context, req pluginapi.HTTPRequest) (*http.Response, *config.Config, error) {\n\tif c == nil || c.host == nil {\n\t\treturn nil, nil, fmt.Errorf(\"host http client is unavailable\")\n\t}\n\tif ctx == nil {\n\t\tctx = context.Background()\n\t}\n\tcfg := c.host.currentRuntimeConfig()\n\tmethod := req.Method\n\tif method == \"\" {\n\t\tmethod = http.MethodGet\n\t}\n\thttpReq, errNewRequest := http.NewRequestWithContext(ctx, method, req.URL, bytes.NewReader(bytes.Clone(req.Body)))\n\tif errNewRequest != nil {\n\t\treturn nil, cfg, fmt.Errorf(\"create host http request: %w\", errNewRequest)\n\t}\n\thttpReq.Header = cloneHeader(req.Headers)\n\tc.recordHTTPRequest(ctx, cfg, httpReq, req.Body)\n\tclient := helps.NewProxyAwareHTTPClient(ctx, cfg, c.auth, 0)\n\tif client == nil {\n\t\tclient = &http.Client{}\n\t}\n\tresp, errDo := client.Do(httpReq)\n\tif errDo != nil {\n\t\thelps.RecordAPIResponseError(ctx, cfg, errDo)\n\t\treturn nil, cfg, fmt.Errorf(\"execute host http request: %w\", errDo)\n\t}\n\treturn resp, cfg, nil\n}\n\nfunc (c *hostHTTPClient) recordHTTPRequest(ctx context.Context, cfg *config.Config, req *http.Request, body []byte) {\n\tif req == nil {\n\t\treturn","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/pluginhost/http_bridge.go#L104-L140","documentation":"Error \"create host http request: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/pluginhost/http_bridge.go:122 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the request URL and headers from the plugin are valid.","Check the wrapped error for request construction details."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}