{"record":{"id":"783fd301276aba02","repo":"router-for-me/CLIProxyAPI","slug":"invalid-body","errorCode":"invalid_body","errorMessage":"%s: %w","messagePattern":"%s: %w","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"internal/api/handlers/management/plugins.go","lineNumber":576,"sourceCode":"\t}\n\tvar item config.PluginInstanceConfig\n\tif errDecode := node.Decode(&item); errDecode != nil {\n\t\treturn config.PluginInstanceConfig{}, errDecode\n\t}\n\treturn item, nil\n}\n\nfunc yamlNodeFromJSONObject(body map[string]any) (*yaml.Node, error) {\n\tnode := emptyYAMLMappingNode()\n\tkeys := make([]string, 0, len(body))\n\tfor key := range body {\n\t\tkeys = append(keys, key)\n\t}\n\tsort.Strings(keys)\n\tfor _, key := range keys {\n\t\tvalueNode, errNode := yamlNodeFromJSONValue(body[key])\n\t\tif errNode != nil {\n\t\t\treturn nil, fmt.Errorf(\"%s: %w\", key, errNode)\n\t\t}\n\t\tsetYAMLMappingValue(node, key, valueNode)\n\t}\n\treturn node, nil\n}\n\nfunc yamlNodeFromJSONValue(value any) (*yaml.Node, error) {\n\tswitch typed := value.(type) {\n\tcase nil:\n\t\treturn &yaml.Node{Kind: yaml.ScalarNode, Tag: \"!!null\", Value: \"null\"}, nil\n\tcase string:\n\t\treturn &yaml.Node{Kind: yaml.ScalarNode, Tag: \"!!str\", Value: typed}, nil\n\tcase bool:\n\t\treturn boolYAMLNode(typed), nil\n\tcase json.Number:\n\t\tif _, errInt64 := typed.Int64(); errInt64 == nil {\n\t\t\treturn &yaml.Node{Kind: yaml.ScalarNode, Tag: \"!!int\", Value: typed.String()}, nil\n\t\t}","sourceCodeStart":558,"sourceCodeEnd":594,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/api/handlers/management/plugins.go#L558-L594","documentation":"Error \"%s: %w\" thrown in router-for-me/CLIProxyAPI.","triggerScenarios":"Thrown at internal/api/handlers/management/plugins.go:576 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-15T17:31:12.345Z"}