{"record":{"id":"87a1658139814715","repo":"sipeed/picoclaw","slug":"channel-q-failed-to-decode-settings-w-87a165","errorCode":null,"errorMessage":"channel %q failed to decode settings: %w","messagePattern":"channel %q failed to decode settings: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config_channel.go","lineNumber":353,"sourceCode":"\t\treturn fmt.Errorf(\"target is nil\")\n\t}\n\tif err := b.Settings.Decode(target); err != nil {\n\t\treturn err\n\t}\n\tb.extend = target\n\treturn nil\n}\n\n// GetDecoded returns the previously decoded settings struct.\n// If Decode hasn't been called yet, it lazily decodes using the channel Type prototype.\n// Returns an error if decoding fails; the decoded value (possibly nil) is still returned\n// so callers can distinguish between \"not decoded\" and \"decode failed\".\nfunc (b *Channel) GetDecoded() (any, error) {\n\tif b.extend == nil {\n\t\t// fallback to prototype-based creation\n\t\tif target := newChannelSettings(b.Type); target != nil {\n\t\t\tif err := b.Decode(target); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"channel %q failed to decode settings: %w\", b.name, err)\n\t\t\t}\n\t\t}\n\t}\n\treturn b.extend, nil\n}\n\n// UnmarshalYAML implements yaml.Unmarshaler for Channel.\n// Merges the YAML node into the existing Channel.\n// Supports both nested format (settings: {...}) and flat format (token: xxx).\nfunc (b *Channel) UnmarshalYAML(value *yaml.Node) error {\n\tif value.Kind == 0 {\n\t\treturn nil\n\t}\n\n\ttype alias Channel\n\ta := alias(*b)\n\terr := value.Decode(&a)\n\tif err != nil {","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config_channel.go#L335-L371","documentation":"Error \"channel %q failed to decode settings: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/config/config_channel.go:353 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":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}