Skip to content

fix(room-server): log ERROR when add_post() returns False in _on_message_received#9

Open
tjdownes wants to merge 1 commit intodevfrom
fix/room-server-logging
Open

fix(room-server): log ERROR when add_post() returns False in _on_message_received#9
tjdownes wants to merge 1 commit intodevfrom
fix/room-server-logging

Conversation

@tjdownes
Copy link
Copy Markdown
Owner

@tjdownes tjdownes commented May 1, 2026

Summary

  • When add_post() returns False (message dropped or DB error), the failure was silently ignored
  • Now logs at ERROR level so dropped messages are visible in the journal

Test plan

  • Trigger a dropped message (e.g. rate limit), verify ERROR appears in logs

…age_received

Previously the failure was silent: add_post() returned False, the success
branch was skipped, and nothing appeared in the logs.  This made it
impossible to distinguish "message processed fine" from "message silently
dropped" without reading the room_server logs separately.

Add an else branch that logs at ERROR level with the room name, sender pubkey
prefix, and the message text so that any storage failure (schema mismatch,
rate limit, DB error) is immediately visible in the application logs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tjdownes tjdownes force-pushed the fix/room-server-logging branch from 1174d3f to 8927610 Compare May 1, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant