{"record":{"id":"bd043e9495c5857f","repo":"googleapis/mcp-toolbox","slug":"unable-to-execute-query-w-bd043e","errorCode":null,"errorMessage":"unable to execute query: %w","messagePattern":"unable to execute query: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/neo4j/neo4j.go","lineNumber":135,"sourceCode":"\tcf := sourceClassifier.Classify(cypherStr)\n\tif cf.Error != nil {\n\t\treturn nil, cf.Error\n\t}\n\n\tif cf.Type == classifier.WriteQuery && readOnly {\n\t\treturn nil, fmt.Errorf(\"this tool is read-only and cannot execute write queries\")\n\t}\n\n\tif dryRun {\n\t\t// Add EXPLAIN to the beginning of the query to validate it without executing\n\t\tcypherStr = \"EXPLAIN \" + cypherStr\n\t}\n\n\tconfig := neo4j.ExecuteQueryWithDatabase(s.Neo4jDatabase())\n\tresults, err := neo4j.ExecuteQuery[*neo4j.EagerResult](ctx, s.Neo4jDriver(), cypherStr, params,\n\t\tneo4j.EagerResultTransformer, config)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to execute query: %w\", err)\n\t}\n\n\t// If dry run, return the summary information only\n\tif dryRun {\n\t\tsummary := results.Summary\n\t\tplan := summary.Plan()\n\t\texecPlan := map[string]any{\n\t\t\t\"queryType\":     cf.Type.String(),\n\t\t\t\"statementType\": summary.QueryType(),\n\t\t\t\"operator\":      plan.Operator(),\n\t\t\t\"arguments\":     plan.Arguments(),\n\t\t\t\"identifiers\":   plan.Identifiers(),\n\t\t\t\"childrenCount\": len(plan.Children()),\n\t\t}\n\t\tif len(plan.Children()) > 0 {\n\t\t\texecPlan[\"children\"] = addPlanChildren(plan)\n\t\t}\n\t\treturn []map[string]any{execPlan}, nil","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/neo4j/neo4j.go#L117-L153","documentation":"Error \"unable to execute query: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/neo4j/neo4j.go:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"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"}