{"record":{"id":"f3c84729d1d9ab8b","repo":"googleapis/mcp-toolbox","slug":"failed-to-sample-label-q-w","errorCode":null,"errorMessage":"failed to sample label %q: %w","messagePattern":"failed to sample label %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/falkordb/falkordbschema/falkordbschema.go","lineNumber":300,"sourceCode":"// property shapes from a sample of nodes.\nfunc (t Tool) extractNodeLabels(ctx context.Context, source compatibleSource) ([]types.NodeLabel, error) {\n\tlabelsResult, err := runReadQuery(ctx, source, \"CALL db.labels()\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list labels: %w\", err)\n\t}\n\n\tvar nodeLabels []types.NodeLabel\n\tfor _, label := range helpers.FirstColumnStrings(labelsResult) {\n\t\tescaped := escapeIdentifier(label)\n\n\t\tcountResult, err := runReadQuery(ctx, source, fmt.Sprintf(\"MATCH (n:`%s`) RETURN count(n) AS count\", escaped))\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to count label %q: %w\", label, err)\n\t\t}\n\n\t\tsampleResult, err := runReadQuery(ctx, source, fmt.Sprintf(\"MATCH (n:`%s`) RETURN n LIMIT %d\", escaped, t.Cfg.SampleSize))\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to sample label %q: %w\", label, err)\n\t\t}\n\t\taccumulator := make(map[string]map[string]bool)\n\t\tfor _, row := range helpers.Rows(sampleResult) {\n\t\t\tnode, ok := row[\"n\"].(map[string]any)\n\t\t\tif !ok {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif properties, ok := node[\"properties\"].(map[string]any); ok {\n\t\t\t\thelpers.MergeProperties(accumulator, properties)\n\t\t\t}\n\t\t}\n\n\t\tnodeLabels = append(nodeLabels, types.NodeLabel{\n\t\t\tName:       label,\n\t\t\tCount:      helpers.FirstRowInt64(countResult),\n\t\t\tProperties: helpers.CollectProperties(accumulator),\n\t\t})\n\t}","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/falkordb/falkordbschema/falkordbschema.go#L282-L318","documentation":"Wrap inside extractNodeLabels: the sampling query that fetches a few example nodes of the named label failed, so property-shape inference for that label could not proceed.","triggerScenarios":"Thrown at internal/tools/falkordb/falkordbschema/falkordbschema.go:300 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the schema extraction if the graph is being mutated concurrently","Check server logs for the underlying query failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}