sipeed/picoclaw · error
channel %q failed to decode settings: %w
Error message
channel %q failed to decode settings: %w
What it means
Error "channel %q failed to decode settings: %w" thrown in sipeed/picoclaw.
Source
Thrown at pkg/config/config_channel.go:353
return fmt.Errorf("target is nil")
}
if err := b.Settings.Decode(target); err != nil {
return err
}
b.extend = target
return nil
}
// GetDecoded returns the previously decoded settings struct.
// If Decode hasn't been called yet, it lazily decodes using the channel Type prototype.
// Returns an error if decoding fails; the decoded value (possibly nil) is still returned
// so callers can distinguish between "not decoded" and "decode failed".
func (b *Channel) GetDecoded() (any, error) {
if b.extend == nil {
// fallback to prototype-based creation
if target := newChannelSettings(b.Type); target != nil {
if err := b.Decode(target); err != nil {
return nil, fmt.Errorf("channel %q failed to decode settings: %w", b.name, err)
}
}
}
return b.extend, nil
}
// UnmarshalYAML implements yaml.Unmarshaler for Channel.
// Merges the YAML node into the existing Channel.
// Supports both nested format (settings: {...}) and flat format (token: xxx).
func (b *Channel) UnmarshalYAML(value *yaml.Node) error {
if value.Kind == 0 {
return nil
}
type alias Channel
a := alias(*b)
err := value.Decode(&a)
if err != nil {View on GitHub (pinned to 49183d7e8d)
When it happens
Trigger: Thrown at pkg/config/config_channel.go:353 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/87a1658139814715.
Report an issue: GitHub.