sipeed/picoclaw · error

invalid %s in chatID: %s

Error message

invalid %s in chatID: %s

What it means

Error "invalid %s in chatID: %s" thrown in sipeed/picoclaw.

Source

Thrown at pkg/channels/onebot/onebot.go:600

}

func (c *OneBotChannel) buildSendRequest(msg bus.OutboundMessage) (string, any, error) {
	chatID := msg.ChatID
	segments := c.buildMessageSegments(chatID, msg.Content)

	var action, idKey string
	var rawID string
	if rest, ok := strings.CutPrefix(chatID, "group:"); ok {
		action, idKey, rawID = "send_group_msg", "group_id", rest
	} else if rest, ok := strings.CutPrefix(chatID, "private:"); ok {
		action, idKey, rawID = "send_private_msg", "user_id", rest
	} else {
		action, idKey, rawID = "send_private_msg", "user_id", chatID
	}

	id, err := strconv.ParseInt(rawID, 10, 64)
	if err != nil {
		return "", nil, fmt.Errorf("invalid %s in chatID: %s", idKey, chatID)
	}
	return action, map[string]any{idKey: id, "message": segments}, nil
}

func (c *OneBotChannel) listen() {
	c.mu.Lock()
	conn := c.conn
	c.mu.Unlock()

	if conn == nil {
		logger.WarnC("onebot", "WebSocket connection is nil, listener exiting")
		return
	}

	for {
		select {
		case <-c.ctx.Done():
			return

View on GitHub (pinned to 49183d7e8d)

When it happens

Trigger: Thrown at pkg/channels/onebot/onebot.go:600 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/34d73284eff0f2be. Report an issue: GitHub.