{"record":{"id":"6815e4de362fa9fe","repo":"grafana/k6","slug":"fromline-must-be-less-than-or-equal-to-toline","errorCode":null,"errorMessage":"fromLine must be less than or equal to toLine","messagePattern":"fromLine must be less than or equal to toLine","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/experimental/csv/module.go","lineNumber":363,"sourceCode":"\n\tif v := obj.Get(\"skipFirstLine\"); v != nil {\n\t\toptions.SkipFirstLine = v.ToBoolean()\n\t}\n\n\tif v := obj.Get(\"fromLine\"); v != nil {\n\t\toptions.FromLine = null.IntFrom(v.ToInteger())\n\t}\n\n\tif v := obj.Get(\"toLine\"); v != nil {\n\t\toptions.ToLine = null.IntFrom(v.ToInteger())\n\t}\n\n\tif v := obj.Get(\"asObjects\"); v != nil {\n\t\toptions.AsObjects = null.BoolFrom(v.ToBoolean())\n\t}\n\n\tif options.FromLine.Valid && options.ToLine.Valid && options.FromLine.Int64 >= options.ToLine.Int64 {\n\t\treturn options, fmt.Errorf(\"fromLine must be less than or equal to toLine\")\n\t}\n\n\treturn options, nil\n}\n","sourceCodeStart":345,"sourceCodeEnd":368,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/experimental/csv/module.go#L345-L368","documentation":"Raised in newParserOptionsFrom when both fromLine and toLine options are provided and fromLine is greater than or equal to toLine, which would define an empty or inverted line range for the CSV parser.","triggerScenarios":"Thrown at internal/js/modules/k6/experimental/csv/module.go:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set fromLine strictly less than toLine, e.g. {fromLine: 1, toLine: 10}","Omit fromLine or toLine if you only need one bound","Use 0-based non-negative line indices consistent with the reader's expectations"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}