{"record":{"id":"82ed6a1feefa65cc","repo":"googleapis/mcp-toolbox","slug":"unable-to-scan-row-w-82ed6a","errorCode":null,"errorMessage":"unable to scan row: %w","messagePattern":"unable to scan row: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/snowflake/snowflake.go","lineNumber":126,"sourceCode":"\t\treturn nil, fmt.Errorf(\"unable to execute query: %w\", err)\n\t}\n\tdefer rows.Close()\n\n\tout := []any{}\n\tfor rows.Next() {\n\t\tcols, err := rows.Columns()\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to get columns: %w\", err)\n\t\t}\n\n\t\tvalues := make([]interface{}, len(cols))\n\t\tvaluePtrs := make([]interface{}, len(cols))\n\t\tfor i := range values {\n\t\t\tvaluePtrs[i] = &values[i]\n\t\t}\n\n\t\tif err := rows.Scan(valuePtrs...); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"unable to scan row: %w\", err)\n\t\t}\n\n\t\tvMap := make(map[string]any)\n\t\tfor i, col := range cols {\n\t\t\tvMap[col] = values[i]\n\t\t}\n\t\tout = append(out, vMap)\n\t}\n\n\tif err := rows.Err(); err != nil {\n\t\treturn nil, fmt.Errorf(\"row iteration error: %w\", err)\n\t}\n\n\treturn out, nil\n}\n\nfunc initSnowflakeConnection(ctx context.Context, tracer trace.Tracer, name, account, user, password, database, schema, warehouse, role string) (*sqlx.DB, error) {\n\t//nolint:all // Reassigned ctx","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/snowflake/snowflake.go#L108-L144","documentation":"rows.Scan failed to copy the current row's column values into the prepared destination slice — typically a driver-level type conversion mismatch between the Snowflake column value and the scanned interface{}.","triggerScenarios":"Thrown at internal/sources/snowflake/snowflake.go:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped driver error for the failing column and type","Cast or convert problematic column types in the query","Retry on transient mid-iteration failures"],"exampleFix":null,"handlingStrategy":"type-guard","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"}