{"record":{"id":"f2c0ef42c61490d0","repo":"grafana/k6","slug":"failed-to-skip-lines-until-line-d-reason-w","errorCode":null,"errorMessage":"failed to skip lines until line %d; reason: %w","messagePattern":"failed to skip lines until line (.+?); reason: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/experimental/csv/reader.go","lineNumber":79,"sourceCode":"\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to read the first line; reason: %w\", err)\n\t\t}\n\t\treader.columnNames = header\n\t\treader.currentLine.Add(1)\n\t}\n\n\tif options.SkipFirstLine && (!options.FromLine.Valid || options.FromLine.Int64 == 0) {\n\t\tif _, err := csvParser.Read(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to skip the first line; reason: %w\", err)\n\t\t}\n\n\t\treader.currentLine.Add(1)\n\t}\n\n\tif options.FromLine.Valid && options.FromLine.Int64 > 0 {\n\t\tfor reader.currentLine.Load() < options.FromLine.Int64 {\n\t\t\tif _, err := csvParser.Read(); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to skip lines until line %d; reason: %w\", options.FromLine.Int64, err)\n\t\t\t}\n\t\t\treader.currentLine.Add(1)\n\t\t}\n\t}\n\n\treturn reader, nil\n}\n\n// The csv module's read must implement the RecordReader interface.\nvar _ data.RecordReader = (*Reader)(nil)\n\n// Read reads a record from the CSV file.\n//\n// If the `header` option is enabled, it will return a map of the record.\n// Otherwise, it will return the record as a slice of strings.\nfunc (r *Reader) Read() (any, error) {\n\ttoLineSet := r.options.ToLine.Valid\n","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/js/modules/k6/experimental/csv/reader.go#L61-L97","documentation":"Error \"failed to skip lines until line %d; reason: %w\" thrown in grafana/k6.","triggerScenarios":"Thrown at internal/js/modules/k6/experimental/csv/reader.go:79 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":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}