Fix: Skip posting vote results when poll data cannot be read#9
Open
its-applekid wants to merge 1 commit into
Open
Fix: Skip posting vote results when poll data cannot be read#9its-applekid wants to merge 1 commit into
its-applekid wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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 (
voteResultsis null).Before: Created fake
expiredResultswith all zeros and posted themAfter: Log a warning and silently continue cleanup flow without posting
Changes
elseblock that created and posted zero-value resultsImpact