Skip to content

Conversation

@Dobrunia
Copy link
Member

@Dobrunia Dobrunia commented Jan 28, 2026

Problem

Events with invalid payload types (e.g. payload: true instead of an object) were being stored in MongoDB. This led to:

  • GraphQL error: Cannot return null for non-nullable field EventPayload.title
  • Frontend error: TypeError: can't access property "event", l is null when loading project overview

Root cause: clients using beforeSend incorrectly (e.g. returning true instead of the event object) could send payloads that workers accepted and the grouper persisted as-is.

Solution

Add payload validation in workers so invalid payloads are rejected before processing:

  • JavaScript worker: reject events where payload is not a plain object (null, array, boolean, string, number).
  • Grouper worker: same check at the start of handle() so no invalid events are saved to events:* collections.

Invalid events are logged and dropped; they are no longer written to the DB.

Related PRs:

@Dobrunia Dobrunia requested review from e11sy and neSpecc January 28, 2026 14:57
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.

2 participants