{"record":{"id":"0d788ab751ebf1e6","repo":"googleapis/mcp-toolbox","slug":"error-creating-decoder-w","errorCode":null,"errorMessage":"error creating decoder: %w","messagePattern":"error creating decoder: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/config.go","lineNumber":378,"sourceCode":"\t\t\t\t\tl.WarnContext(ctx, fmt.Sprintf(\"group %q shadows a toolset of the same name; using the group definition\", name))\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tgroupConfigs[name] = gc\n\t\t}\n\t}\n\n\treturn sourceConfigs, authServiceConfigs, embeddingModelConfigs, toolConfigs, promptConfigs, groupConfigs, nil\n}\n\nfunc UnmarshalYAMLSourceConfig(ctx context.Context, name string, r map[string]any) (sources.SourceConfig, error) {\n\tresourceType, ok := r[\"type\"].(string)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"missing 'type' field or it is not a string\")\n\t}\n\tdec, err := util.NewStrictDecoder(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating decoder: %w\", err)\n\t}\n\tsourceConfig, err := sources.DecodeConfig(ctx, resourceType, name, dec)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn sourceConfig, nil\n}\n\nfunc UnmarshalYAMLAuthServiceConfig(ctx context.Context, name string, r map[string]any) (auth.AuthServiceConfig, error) {\n\tresourceType, ok := r[\"type\"].(string)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"missing 'type' field or it is not a string\")\n\t}\n\tdec, err := util.NewStrictDecoder(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating decoder: %s\", err)\n\t}\n","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/config.go#L360-L396","documentation":"Error \"error creating decoder: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/config.go:378 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}