{"record":{"id":"e8121ce1329ba0e6","repo":"grafana/k6","slug":"d-is-too-big","errorCode":null,"errorMessage":"%d is too big","messagePattern":"(.+?) is too big","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/types/types.go","lineNumber":185,"sourceCode":"\tcase int8:\n\t\treturn int64(n), nil\n\tcase int16:\n\t\treturn int64(n), nil\n\tcase int32:\n\t\treturn int64(n), nil\n\tcase int64:\n\t\treturn n, nil\n\tcase uint:\n\t\treturn int64(n), nil //nolint:gosec\n\tcase uint8:\n\t\treturn int64(n), nil\n\tcase uint16:\n\t\treturn int64(n), nil\n\tcase uint32:\n\t\treturn int64(n), nil\n\tcase uint64:\n\t\tif n > math.MaxInt64 {\n\t\t\treturn 0, fmt.Errorf(\"%d is too big\", n)\n\t\t}\n\t\treturn int64(n), nil\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"unable to use type %T as a duration value\", v)\n\t}\n}\n\n// GetDurationValue is a helper function that can convert a lot of different\n// types to time.Duration.\n//\n// TODO: move to a separate package and check for integer overflows?\nfunc GetDurationValue(v any) (time.Duration, error) {\n\tswitch d := v.(type) {\n\tcase time.Duration:\n\t\treturn d, nil\n\tcase string:\n\t\treturn ParseExtendedDuration(d)\n\tcase float32:","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/lib/types/types.go#L167-L203","documentation":"Raised by getInt64 (a helper behind GetDurationValue) when a duration option is supplied as a uint64 greater than math.MaxInt64, so it cannot be converted to int64 without overflow.","triggerScenarios":"Thrown at lib/types/types.go:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a smaller numeric value or a duration string","Avoid values near or above 2^63-1 (e.g. millisecond counts beyond ~292 million years)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}