{"record":{"id":"8c91ff394be56253","repo":"hyperledger/fabric","slug":"failed-unmarshalling-configuration-file-at-s","errorCode":null,"errorMessage":"failed unmarshalling configuration file at [%s]","messagePattern":"failed unmarshalling configuration file at \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"msp/configbuilder.go","lineNumber":278,"sourceCode":"\n\t// Load configuration file\n\t// if the configuration file is there then load it\n\t// otherwise skip it\n\tvar ouis []*msp.FabricOUIdentifier\n\tvar nodeOUs *msp.FabricNodeOUs\n\t_, err = os.Stat(configFile)\n\tif err == nil {\n\t\t// load the file, if there is a failure in loading it then\n\t\t// return an error\n\t\traw, err := os.ReadFile(configFile)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"failed loading configuration file at [%s]\", configFile)\n\t\t}\n\n\t\tconfiguration := Configuration{}\n\t\terr = yaml.Unmarshal(raw, &configuration)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"failed unmarshalling configuration file at [%s]\", configFile)\n\t\t}\n\n\t\t// Prepare OrganizationalUnitIdentifiers\n\t\tif len(configuration.OrganizationalUnitIdentifiers) > 0 {\n\t\t\tfor _, ouID := range configuration.OrganizationalUnitIdentifiers {\n\t\t\t\tf := filepath.Join(dir, ouID.Certificate)\n\t\t\t\traw, err = readFile(f)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, errors.Wrapf(err, \"failed loading OrganizationalUnit certificate at [%s]\", f)\n\t\t\t\t}\n\n\t\t\t\toui := &msp.FabricOUIdentifier{\n\t\t\t\t\tCertificate:                  raw,\n\t\t\t\t\tOrganizationalUnitIdentifier: ouID.OrganizationalUnitIdentifier,\n\t\t\t\t}\n\t\t\t\touis = append(ouis, oui)\n\t\t\t}\n\t\t}","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/msp/configbuilder.go#L260-L296","documentation":"getMspConfig: the MSP config.yaml was read but yaml.Unmarshal into the Configuration struct failed, i.e., the file is not valid YAML or its fields do not match the expected schema (OrganizationalUnitIdentifiers, NodeOUs, etc.).","triggerScenarios":"Thrown at msp/configbuilder.go:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the file's YAML syntax","Correct field names/types to match the MSP Configuration schema","Check for tabs or structural mistakes breaking unmarshalling"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}