{"record":{"id":"5858b8b54631367c","repo":"googleapis/mcp-toolbox","slug":"error-during-row-iteration-w","errorCode":null,"errorMessage":"error during row iteration: %w","messagePattern":"error during row iteration: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/cockroachdb/cockroachdbexecutesql/cockroachdbexecutesql.go","lineNumber":143,"sourceCode":"\tdefer results.Close()\n\n\tfields := results.FieldDescriptions()\n\n\tout := []any{}\n\tfor results.Next() {\n\t\tv, err := results.Values()\n\t\tif err != nil {\n\t\t\treturn nil, util.NewClientServerError(\"unable to parse row\", http.StatusInternalServerError, err)\n\t\t}\n\t\trow := orderedmap.Row{}\n\t\tfor i, f := range fields {\n\t\t\trow.Add(f.Name, v[i])\n\t\t}\n\t\tout = append(out, row)\n\t}\n\n\tif err := results.Err(); err != nil {\n\t\treturn nil, util.ProcessGeneralError(fmt.Errorf(\"error during row iteration: %w\", err))\n\t}\n\n\treturn out, nil\n}\n","sourceCodeStart":125,"sourceCodeEnd":148,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/cockroachdb/cockroachdbexecutesql/cockroachdbexecutesql.go#L125-L148","documentation":"Runtime failure wrap in Invoke: results.Err() reported an error after the pgx row-iteration loop finished, meaning streaming of the result set aborted mid-way (network drop, context cancellation, or decode failure on later rows).","triggerScenarios":"Thrown at internal/tools/cockroachdb/cockroachdbexecutesql/cockroachdbexecutesql.go:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error to see whether the connection dropped or the context was cancelled","Add a LIMIT or narrower query to reduce result-set size and retry","Check that column values do not overflow their destination types"],"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"}