{"record":{"id":"7ce356e300db59a1","repo":"googleapis/mcp-toolbox","slug":"failed-to-execute-pipeline-request-w","errorCode":null,"errorMessage":"failed to execute pipeline request: %w","messagePattern":"failed to execute pipeline request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/firestore/firestore.go","lineNumber":926,"sourceCode":"\t\t}\n\t\tbodyBytes, err = json.Marshal(payload)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to marshal pipeline payload: %w\", err)\n\t\t}\n\t}\n\n\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, url, bytes.NewReader(bodyBytes))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create HTTP request: %w\", err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\treq.Header.Set(\"User-Agent\", userAgent)\n\treq.Header.Set(\"x-goog-request-params\", fmt.Sprintf(\"project_id=%s&database_id=%s\", s.GetProjectId(), s.GetDatabaseId()))\n\treq.Header.Set(\"x-goog-firestore-api-requester\", \"querydata\")\n\n\tresp, err := httpClient.Do(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to execute pipeline request: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\trespBody, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to read response body: %w\", err)\n\t}\n\n\tif resp.StatusCode < 200 || resp.StatusCode >= 300 {\n\t\treturn nil, fmt.Errorf(\"executePipeline API error (status %d): %s\", resp.StatusCode, string(respBody))\n\t}\n\n\tvar result any\n\tif err := json.Unmarshal(respBody, &result); err != nil {\n\t\treturn string(respBody), nil\n\t}\n\n\treturn result, nil","sourceCodeStart":908,"sourceCodeEnd":944,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/firestore/firestore.go#L908-L944","documentation":"This error wraps a failure from httpClient.Do(req) in ExecuteMQL — the executePipeline HTTP POST to Firestore never completed. Causes are transport-level: DNS failure, unreachable host, TLS handshake error, timeouts, or context cancellation mid-flight. No HTTP response was received, so no status code is available.","triggerScenarios":"httpClient.Do(req) returns a non-nil error during the POST to the Firestore executePipeline endpoint: network outage, DNS resolution failure, TLS failure, client timeout exceeded, or the request context being cancelled while the request was in flight.","commonSituations":"No internet/VPC-egress route to firestore.googleapis.com; corporate proxy or firewall blocking the call; the HTTP source Timeout being shorter than the pipeline execution; caller cancelling ctx (e.g. HTTP handler deadline) mid-request; transient Google API outages.","solutions":["Check basic connectivity to firestore.googleapis.com (DNS, firewall, proxy settings) from the host","Increase the HTTP source Timeout if long-running pipelines are being cut off","Retry with backoff for transient network errors; check ctx cancellation to distinguish caller-induced aborts from true network faults"],"exampleFix":"// before\nctx := context.Background()\nres, err := src.ExecuteMQL(ctx, pipeline) // hangs/fails on slow networks\n// after\nctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)\ndefer cancel()\nres, err := src.ExecuteMQL(ctx, pipeline)","handlingStrategy":"retry","validationCode":"// preflight connectivity check\nconn, err := net.DialTimeout(\"tcp\", \"firestore.googleapis.com:443\", 5*time.Second)\nif err != nil { log.Printf(\"no egress to Firestore API: %v\", err) } else { conn.Close() }","typeGuard":null,"tryCatchPattern":"var res string\nvar err error\nfor i := 0; i < 3; i++ {\n    res, err = src.ExecuteMQL(ctx, pipeline)\n    if err == nil || !isNetworkErr(err) || ctx.Err() != nil { break }\n    time.Sleep(time.Duration(1<<i) * 100 * time.Millisecond)\n}","preventionTips":["Size the HTTP source Timeout generously for heavy pipelines","Ensure firewall/proxy egress to firestore.googleapis.com:443","Check ctx cancellation separately from transport errors before retrying"],"tags":["firestore","http","network","timeout"],"backgroundTag":"network-request-failed","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}