{"record":{"id":"30eaa7340daeeeef","repo":"grafana/k6","slug":"executor-s-function-s-not-found-in-exports","errorCode":null,"errorMessage":"executor %s: function '%s' not found in exports","messagePattern":"executor (.+?): function '(.+?)' not found in exports","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cmd/config.go","lineNumber":367,"sourceCode":"}\n\nfunc consolidateErrorMessage(errList []error, title string) error {\n\tif len(errList) == 0 {\n\t\treturn nil\n\t}\n\n\terrMsgParts := []string{title}\n\tfor _, err := range errList {\n\t\terrMsgParts = append(errMsgParts, fmt.Sprintf(\"\\t- %s\", err.Error()))\n\t}\n\n\treturn errors.New(strings.Join(errMsgParts, \"\\n\"))\n}\n\nfunc validateScenarioConfig(conf lib.ExecutorConfig, isExecutable func(string) bool) error {\n\texecFn := conf.GetExec()\n\tif !isExecutable(execFn) {\n\t\treturn fmt.Errorf(\"executor %s: function '%s' not found in exports\", conf.GetName(), execFn)\n\t}\n\treturn nil\n}\n","sourceCodeStart":349,"sourceCodeEnd":371,"githubUrl":"https://github.com/grafana/k6/blob/3fcf5388d78cb382f0c0d42ec556a06bfd1b8dee/internal/cmd/config.go#L349-L371","documentation":"Scenario validation error: a scenario/executor's exec option names a JS function that is not exported by the script, so that scenario has nothing to run. validateScenarioConfig fires during config validation before the test starts.","triggerScenarios":"Thrown at internal/cmd/config.go:359 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Export the named function from the script: export function myFn() { ... }","Fix the exec value or scenario key typo in the scenarios configuration","Ensure the default function exists when exec is omitted"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fcf5388d78cb382f0c0d42ec556a06bfd1b8dee","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}