{"record":{"id":"ebaa6a2c43e8b9bf","repo":"sipeed/picoclaw","slug":"invalid-s-in-chatid-s-w","errorCode":null,"errorMessage":"invalid %s in chatID: %s: %w","messagePattern":"invalid (.+?) in chatID: (.+?): %w","errorType":"console","errorClass":"channels.ErrSendFailed","httpStatus":null,"severity":"error","filePath":"pkg/channels/onebot/onebot.go","lineNumber":532,"sourceCode":"\n\tif len(segments) == 0 {\n\t\treturn nil, nil\n\t}\n\n\tchatID := msg.ChatID\n\tvar action, idKey string\n\tvar rawID string\n\tif rest, ok := strings.CutPrefix(chatID, \"group:\"); ok {\n\t\taction, idKey, rawID = \"send_group_msg\", \"group_id\", rest\n\t} else if rest, ok := strings.CutPrefix(chatID, \"private:\"); ok {\n\t\taction, idKey, rawID = \"send_private_msg\", \"user_id\", rest\n\t} else {\n\t\taction, idKey, rawID = \"send_private_msg\", \"user_id\", chatID\n\t}\n\n\tid, err := strconv.ParseInt(rawID, 10, 64)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid %s in chatID: %s: %w\", idKey, chatID, channels.ErrSendFailed)\n\t}\n\n\techo := fmt.Sprintf(\"send_%d\", atomic.AddInt64(&c.echoCounter, 1))\n\n\treq := oneBotAPIRequest{\n\t\tAction: action,\n\t\tParams: map[string]any{idKey: id, \"message\": segments},\n\t\tEcho:   echo,\n\t}\n\n\tdata, err := json.Marshal(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to marshal OneBot request: %w\", err)\n\t}\n\n\tc.writeMu.Lock()\n\t_ = conn.SetWriteDeadline(time.Now().Add(10 * time.Second))\n\terr = conn.WriteMessage(websocket.TextMessage, data)","sourceCodeStart":514,"sourceCodeEnd":550,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/onebot/onebot.go#L514-L550","documentation":"Error \"invalid %s in chatID: %s: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/onebot/onebot.go:532 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"}