Skip to content

fix: add missing funnel event types to resolve 422 errors - #579

Merged
jacoby149 merged 2 commits into
devfrom
jacoby149/jacobyy149/fix-analytics-422-errors
Aug 12, 2026
Merged

fix: add missing funnel event types to resolve 422 errors#579
jacoby149 merged 2 commits into
devfrom
jacoby149/jacobyy149/fix-analytics-422-errors

Conversation

@jacoby149

Copy link
Copy Markdown
Owner

Problem

Analytics endpoints returned 422 errors for /analytics/funnel because the FunnelEvent enum on the server was missing 11 event types that the marketing-ui client sends.

Root Cause

FastAPI/Pydantic validates the event field against the FunnelEvent enum. When the client sent an unrecognized event (e.g. freedom_view, trending_load_more), validation failed with 422.

Fix

Added all missing event types to FunnelEvent in marketing/marketing-api/app/models.py:

  • freedom_view, everything_view
  • trending_load_more, trending_comment_attempt, trending_like_attempt, trending_repost_attempt
  • trending_preset, trending_search, trending_view_toggle
  • join_view, join_click

Notes

  • The ERR_BLOCKED_BY_CLIENT errors in the console are from ad blockers — separate issue, not fixable server-side.
  • The pageview 422 errors may also have been caused by ad blocker interference modifying request bodies.
  • All 19 smoke tests pass.

The FunnelEvent enum was missing 11 event types that the marketing-ui
client sends (freedom_view, everything_view, trending_load_more,
trending_comment/like/repost_attempt, trending_preset, trending_search,
trending_view_toggle, join_view, join_click). FastAPI returned 422
validation errors when the client sent any unrecognized event.
@jacoby149
jacoby149 merged commit 68776f2 into dev Aug 12, 2026
1 check passed
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