{"record":{"id":"b6a7f50386d1dc49","repo":"grafana/k6","slug":"no-secret-sources-are-configured","errorCode":null,"errorMessage":"no secret sources are configured","messagePattern":"no secret sources are configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"secretsource/manager.go","lineNumber":58,"sourceCode":"\t\t\tcache[k] = cache[\"default\"]\n\t\t\tcontinue\n\t\t}\n\t\tcache[k] = new(sync.Map)\n\t}\n\tsm := &Manager{\n\t\thook:    hook,\n\t\tsources: sources,\n\t\tcache:   cache,\n\t}\n\treturn sm, hook, nil\n}\n\n// Get is the way to get a secret for the provided source name and key of the secret.\n// It can be used with the [DefaultSourceName].\n// This automatically starts redacting the secret before returning it.\nfunc (sm *Manager) Get(sourceName, key string) (string, error) {\n\tif len(sm.cache) == 0 {\n\t\treturn \"\", errors.New(\"no secret sources are configured\")\n\t}\n\tsourceCache, ok := sm.cache[sourceName]\n\tif !ok {\n\t\treturn \"\", UnknownSourceError(sourceName)\n\t}\n\tv, ok := sourceCache.Load(key)\n\tif ok {\n\t\treturn v.(string), nil //nolint:forcetypeassert\n\t}\n\tsource := sm.sources[sourceName]\n\tvalue, err := source.Get(key)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tsourceCache.Store(key, value)\n\tsm.hook.add(value)\n\treturn value, err\n}","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/secretsource/manager.go#L40-L76","documentation":"Returned by the secret source Manager.Get when a secret is requested but no secret sources were registered at startup — the internal cache map is empty, so there is no provider to query for the given source name and key.","triggerScenarios":"Thrown at secretsource/manager.go:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register at least one secret source (e.g. via a secret source extension) before the test run","Verify the k6 build includes the required secret source extension","Do not reference ${{secret:...}} placeholders if no sources are configured"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}