Skip to content

Fix: Skip posting vote results when poll data cannot be read#9

Open
its-applekid wants to merge 1 commit into
its-everdred:mainfrom
its-applekid:fix/skip-failed-poll-reads
Open

Fix: Skip posting vote results when poll data cannot be read#9
its-applekid wants to merge 1 commit into
its-everdred:mainfrom
its-applekid:fix/skip-failed-poll-reads

Conversation

@its-applekid
Copy link
Copy Markdown
Contributor

Problem

When Gary cannot read EasyPoll results (due to API failures, permission issues, or deleted polls), it currently posts confusing all-zero vote results to channels:

  • 0 yes votes
  • 0 no votes
  • 0 total votes
  • 0 quorum
  • Shows "FAILED" status

This is misleading and looks like a legitimate failed vote when it's actually a data fetch failure.

Solution

Skip posting vote results entirely when poll data is unavailable (voteResults is null).

Before: Created fake expiredResults with all zeros and posted them
After: Log a warning and silently continue cleanup flow without posting

Changes

  • Removed the else block that created and posted zero-value results
  • Added warning log when poll data cannot be read
  • Cleanup process continues normally (state transition to CLEANUP still happens)

Impact

  • No more confusing all-zero result posts
  • Cleaner error handling for poll read failures
  • Admins can check logs if they notice missing results

When Gary cannot read EasyPoll results (API failure, permissions issue,
or poll deleted), skip posting results to channels instead of showing
confusing all-zero vote counts.

Now logs a warning and silently continues the cleanup flow without
posting misleading results.
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