#454·sphere

[HIGH] Group message send failure silently discards the typed message

Author: KruGoLCreated Jul 23, 2026Updated Jul 23, 2026
Labelsbug

Summary

GroupChatModule.sendMessage in the SDK never throws on publish failure — it catches and returns null (verified in the installed SDK: logger.error("GroupChat", "Failed to send message", error); return null). The mutation wraps it as return !!message, so it resolves with false instead of rejecting; onSuccess runs unconditionally and clears the input (setMessageInput('')), and the global mutation onError toast never fires. The user's typed group message is gone with zero feedback.

Where

src/components/chat/hooks/useGroupChat.ts:367.

Fix (app-side, immediate)

In mutationFn: if (!message) throw new Error('Failed to send message') so the global onError toast fires and onSuccess (input clearing) is skipped. Apply the same guard to the mini-chat/DM send flows and to deleteMessage/kickUser/createGroup (all fail silently today).

Companion SDK improvement (optional)

The proper upstream fix is for GroupChatModule.sendMessage (and the moderation methods) to surface failures — throw, or return a typed { ok: false, error } — instead of swallowing them and returning null. Tracked separately in the SDK repo.

Found by multi-agent audit @ main b477d4d7; adversarially verified.