{"record":{"id":"357e3da8b23e06b9","repo":"sipeed/picoclaw","slug":"channel-s-w","errorCode":null,"errorMessage":"channel %s: %w","messagePattern":"channel (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/manager.go","lineNumber":1245,"sourceCode":"\tfailedNames := make([]string, 0, len(m.channels))\n\n\tfor name, channel := range m.channels {\n\t\tlogger.InfoCF(\"channels\", \"Starting channel\", map[string]any{\n\t\t\t\"channel\": name,\n\t\t})\n\t\tif err := channel.Start(ctx); err != nil {\n\t\t\tlogger.ErrorCF(\"channels\", \"Failed to start channel\", map[string]any{\n\t\t\t\t\"channel\": name,\n\t\t\t\t\"error\":   err.Error(),\n\t\t\t})\n\t\t\tm.publishChannelEvent(\n\t\t\t\truntimeevents.KindChannelLifecycleStartFailed,\n\t\t\t\tname,\n\t\t\t\truntimeevents.Scope{Channel: name},\n\t\t\t\truntimeevents.SeverityError,\n\t\t\t\tChannelLifecyclePayload{Type: channelTypeForEvent(m, name), Error: err.Error()},\n\t\t\t)\n\t\t\tfailedStarts = append(failedStarts, fmt.Errorf(\"channel %s: %w\", name, err))\n\t\t\tfailedNames = append(failedNames, name)\n\t\t\tcontinue\n\t\t}\n\t\t// Lazily create worker only after channel starts successfully\n\t\tchannelType := name\n\t\tif m.config != nil {\n\t\t\tif bc := m.config.Channels.Get(name); bc != nil && bc.Type != \"\" {\n\t\t\t\tchannelType = bc.Type\n\t\t\t}\n\t\t}\n\t\tw := newChannelWorker(name, channel, channelType)\n\t\tm.workers[name] = w\n\t\tgo m.runWorker(dispatchCtx, name, w)\n\t\tgo m.runMediaWorker(dispatchCtx, name, w)\n\t\tm.publishChannelEvent(\n\t\t\truntimeevents.KindChannelLifecycleStarted,\n\t\t\tname,\n\t\t\truntimeevents.Scope{Channel: name},","sourceCodeStart":1227,"sourceCodeEnd":1263,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/manager.go#L1227-L1263","documentation":"Error \"channel %s: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/manager.go:1245 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"}