{"record":{"id":"6c6a57df4363133f","repo":"ory/hydra","slug":"unknown-config-file-extension-s","errorCode":null,"errorMessage":"unknown config file extension: %s","messagePattern":"unknown config file extension: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"oryx/configx/koanf_file.go","lineNumber":48,"sourceCode":"func NewKoanfFile(path string) (*KoanfFile, error) {\n\treturn NewKoanfFileSubKey(path, \"\")\n}\n\nfunc NewKoanfFileSubKey(path, subKey string) (*KoanfFile, error) {\n\tkf := &KoanfFile{\n\t\tpath:   filepath.Clean(path),\n\t\tsubKey: subKey,\n\t}\n\n\tswitch e := filepath.Ext(path); e {\n\tcase \".toml\":\n\t\tkf.parser = toml.Parser()\n\tcase \".json\":\n\t\tkf.parser = json.Parser()\n\tcase \".yaml\", \".yml\":\n\t\tkf.parser = yaml.Parser()\n\tdefault:\n\t\treturn nil, errors.Errorf(\"unknown config file extension: %s\", e)\n\t}\n\n\treturn kf, nil\n}\n\n// ReadBytes is not supported by KoanfFile.\nfunc (f *KoanfFile) ReadBytes() ([]byte, error) {\n\treturn nil, errors.New(\"file provider does not support this method\")\n}\n\n// Read reads the file and returns the parsed configuration.\nfunc (f *KoanfFile) Read() (map[string]interface{}, error) {\n\t//#nosec G304 -- false positive\n\tfc, err := os.ReadFile(f.path)\n\tif err != nil {\n\t\treturn nil, errors.WithStack(err)\n\t}\n","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/ory/hydra/blob/4174065ffb052799890f7480f5360a877a67ffc1/oryx/configx/koanf_file.go#L30-L66","documentation":"Returned by NewKoanfFileSubKey when the config file's extension is not .toml, .json, .yaml or .yml, so no parser can be selected. The file path itself is at fault — its extension names an unsupported configuration format.","triggerScenarios":"Thrown at oryx/configx/koanf_file.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the file to use a supported extension: .toml, .json, .yaml, or .yml","Convert the configuration to one of the supported formats","Check for typos in the path, e.g. a trailing dot or missing extension"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4174065ffb052799890f7480f5360a877a67ffc1","analyzedAt":"2026-09-03T14:52:41.581Z","contentChangedAt":"2026-09-03T14:52:41.581Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}