sipeed/picoclaw · error

channel %q has unknown type %q

Error message

channel %q has unknown type %q

What it means

Error "channel %q has unknown type %q" thrown in sipeed/picoclaw.

Source

Thrown at pkg/config/config_channel.go:742

//     so that b.extend contains the actual settings (e.g., PicoSettings)
//
// After calling this method, callers can safely use b.extend via Decode()
// without re-parsing raw Settings.
func InitChannelList(channels ChannelsConfig) error {
	// Step 1 & 3: validate type and decode into typed settings
	for name, bc := range channels {
		if bc == nil {
			delete(channels, name)
			continue
		}
		// Ensure channel name is set from the map key
		bc.SetName(name)
		// Infer Type from map key if not explicitly set
		if bc.Type == "" {
			bc.Type = name
		}
		if !isValidChannelType(bc.Type) {
			return fmt.Errorf("channel %q has unknown type %q", name, bc.Type)
		}
		// Decode into the correct typed settings
		if target := newChannelSettings(bc.Type); target != nil {
			if err := bc.Decode(target); err != nil {
				return fmt.Errorf("channel %q failed to decode settings: %w", name, err)
			}
			// Apply env overrides for channel-specific fields via struct tags
			if err := env.Parse(target); err != nil {
				// Non-fatal: some env vars may not apply
			}
			applyTelegramStreamingEnvCompat(target)
			if err := validateChannelStreamingConfig(name, target); err != nil {
				return err
			}
		}
	}

	// Step 2: validate singleton constraints

View on GitHub (pinned to 49183d7e8d)

When it happens

Trigger: Thrown at pkg/config/config_channel.go:742 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/5f1142fac71aa419. Report an issue: GitHub.