{"record":{"id":"6c48a8c1f042190a","repo":"router-for-me/CLIProxyAPI","slug":"plugin-config-encode-failed","errorCode":"plugin_config_encode_failed","errorMessage":"%s: %w","messagePattern":"%s: %w","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"internal/api/handlers/management/plugins.go","lineNumber":633,"sourceCode":"\t}\n}\n\nfunc yamlNodeToJSONValue(node *yaml.Node) (any, error) {\n\tif node == nil {\n\t\treturn nil, nil\n\t}\n\tswitch node.Kind {\n\tcase yaml.MappingNode:\n\t\tout := make(map[string]any, len(node.Content)/2)\n\t\tfor index := 0; index+1 < len(node.Content); index += 2 {\n\t\t\tkey := node.Content[index]\n\t\t\tvalue := node.Content[index+1]\n\t\t\tif key == nil {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tchild, errChild := yamlNodeToJSONValue(value)\n\t\t\tif errChild != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"%s: %w\", key.Value, errChild)\n\t\t\t}\n\t\t\tout[key.Value] = child\n\t\t}\n\t\treturn out, nil\n\tcase yaml.SequenceNode:\n\t\tout := make([]any, 0, len(node.Content))\n\t\tfor _, childNode := range node.Content {\n\t\t\tchild, errChild := yamlNodeToJSONValue(childNode)\n\t\t\tif errChild != nil {\n\t\t\t\treturn nil, errChild\n\t\t\t}\n\t\t\tout = append(out, child)\n\t\t}\n\t\treturn out, nil\n\tcase yaml.ScalarNode:\n\t\tif node.Tag == \"!!str\" || node.Tag == \"\" {\n\t\t\treturn node.Value, nil\n\t\t}","sourceCodeStart":615,"sourceCodeEnd":651,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/api/handlers/management/plugins.go#L615-L651","documentation":"Error \"%s: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/api/handlers/management/plugins.go:633 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the prefixed operation name and wrapped error to identify which plugin operation failed.","Retry the plugin operation after fixing the underlying cause reported in the wrapped error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}