{"record":{"id":"43ad68f7a65d8c86","repo":"sipeed/picoclaw","slug":"failed-to-create-long-poll-w","errorCode":null,"errorMessage":"failed to create long poll: %w","messagePattern":"failed to create long poll: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/vk/vk.go","lineNumber":80,"sourceCode":"\t}\n\treturn &v\n}\n\nfunc (c *VKChannel) Start(ctx context.Context) error {\n\tlogger.InfoC(\"vk\", \"Starting VK bot (Long Poll mode)...\")\n\n\tc.ctx, c.cancel = context.WithCancel(ctx)\n\n\tgroupID := c.getVKCfg().GroupID\n\tif groupID == 0 {\n\t\tc.cancel()\n\t\treturn fmt.Errorf(\"group_id is required for VK bot\")\n\t}\n\n\tlp, err := longpoll.NewLongPoll(c.vk, groupID)\n\tif err != nil {\n\t\tc.cancel()\n\t\treturn fmt.Errorf(\"failed to create long poll: %w\", err)\n\t}\n\tc.lp = lp\n\n\tlp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {\n\t\tc.handleMessage(obj.Message)\n\t})\n\n\tc.SetRunning(true)\n\n\tlogger.InfoCF(\"vk\", \"VK bot connected\", map[string]any{\n\t\t\"group_id\": groupID,\n\t})\n\n\tgo func() {\n\t\tif err := lp.Run(); err != nil {\n\t\t\tlogger.ErrorCF(\"vk\", \"Long poll failed\", map[string]any{\n\t\t\t\t\"error\": err.Error(),\n\t\t\t})","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/vk/vk.go#L62-L98","documentation":"Error \"failed to create long poll: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/vk/vk.go:80 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"}