{"record":{"id":"a0f38ed58cb30e90","repo":"googleapis/mcp-toolbox","slug":"unable-to-execute-client-w","errorCode":null,"errorMessage":"unable to execute client: %w","messagePattern":"unable to execute client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/bigtable/bigtable.go","lineNumber":208,"sourceCode":"\terr = bs.Execute(ctx, func(resultRow bigtable.ResultRow) bool {\n\t\tvMap := make(map[string]any)\n\t\tcols := resultRow.Metadata.Columns\n\n\t\tfor _, c := range cols {\n\t\t\tvar columValue any\n\t\t\tif err = resultRow.GetByName(c.Name, &columValue); err != nil {\n\t\t\t\trowErr = err\n\t\t\t\treturn false\n\t\t\t}\n\t\t\tvMap[c.Name] = columValue\n\t\t}\n\n\t\tout = append(out, vMap)\n\n\t\treturn true\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to execute client: %w\", err)\n\t}\n\tif rowErr != nil {\n\t\treturn nil, fmt.Errorf(\"error processing row: %w\", rowErr)\n\t}\n\n\treturn out, nil\n}\n\nfunc initBigtableClient(ctx context.Context, tracer trace.Tracer, name, project, instance string) (*bigtable.Client, error) {\n\t//nolint:all // Reassigned ctx\n\tctx, span := sources.InitConnectionSpan(ctx, tracer, SourceType, name)\n\tdefer span.End()\n\n\t// Set up Bigtable data operations client.\n\tpoolSize := 10\n\tuserAgent, err := util.UserAgentFromContext(ctx)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/bigtable/bigtable.go#L190-L226","documentation":"The bound statement's Execute call — which runs the query over gRPC and streams ResultRows — returned an error. This is the actual query-execution failure point: network/timeout issues, permission denials, invalid query at execution time, or server-side errors mid-stream. The row callback returning false (rowErr path) does NOT trigger this; only the Execute return value does.","triggerScenarios":"bs.Execute(ctx, callback) returns non-nil: gRPC error, deadline exceeded, permission denied on the Bigtable instance, query rejected by the server, or stream interrupted mid-read.","commonSituations":"Deadlines exceeded on large scans; missing IAM roles (bigtable.tables.readRows / bigtable.tables.getData); instance unavailable or quota exceeded; transient network partition between toolbox and Bigtable.","solutions":["Inspect the wrapped gRPC error code (permission-denied, deadline-exceeded, unavailable, etc.) and address specifically","Verify the service account has Bigtable read IAM roles on the instance","Increase the request timeout / context deadline for large queries","Retry on transient codes (unavailable/deadline-exceeded) with backoff"],"exampleFix":"// before\nctx := context.Background()\n// after\nctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)\ndefer cancel()","handlingStrategy":"retry","validationCode":"// preflight IAM check\nfunc canQueryBigtable(ctx context.Context, admin *bigtable.AdminClient, table string) error {\n\t_, err := admin.TableInfo(ctx, table)\n\treturn err // permission-denied surfaces before the query runs\n}","typeGuard":null,"tryCatchPattern":"out, err := src.RunSQL(ctx, stmt, cfgParams, values)\nif err != nil {\n\tif strings.Contains(err.Error(), \"unable to execute client\") {\n\t\tif isTransient(err) { // codes.Unavailable, DeadlineExceeded\n\t\t\treturn retryWithBackoff(ctx, 3, func() error { return runQuery(ctx) })\n\t\t}\n\t}\n\treturn err\n}","preventionTips":["Set generous context timeouts for Bigtable queries","Grant bigtable.tables.getData / readRows IAM roles to the runtime identity","Wrap queries with retry on transient gRPC codes (unavailable, deadline-exceeded)","Monitor instance health and quota usage"],"tags":["bigtable","grpc","query-execution","network"],"backgroundTag":"query-execution-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"}