From 55ee7c508516cb0210203eb6d00f369382afe4b8 Mon Sep 17 00:00:00 2001 From: Applekid Date: Mon, 16 Mar 2026 10:13:42 -0700 Subject: [PATCH] fix: skip posting vote results when poll data cannot be read 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. --- apps/bot/src/lib/jobScheduler.ts | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/apps/bot/src/lib/jobScheduler.ts b/apps/bot/src/lib/jobScheduler.ts index 71b6773..be25d3b 100644 --- a/apps/bot/src/lib/jobScheduler.ts +++ b/apps/bot/src/lib/jobScheduler.ts @@ -513,28 +513,12 @@ export class NominationJobScheduler implements JobScheduler { ); }); } else { - // Vote period expired without results - create default failed results - const expiredResults: VoteResults = { - passed: false, - yesVotes: 0, - noVotes: 0, - totalVotes: 0, - quorumMet: false, - passThresholdMet: false, - memberCount: 0, - requiredQuorum: 0, - requiredPassVotes: 0, - }; - - // Post expired results to all channels - this.voteResultService - .postVoteResults(nominee, expiredResults) - .catch((error) => { - logger.error( - { error, nomineeId: nominee.id }, - 'Failed to post expired vote results' - ); - }); + // Vote period expired without readable poll data - skip posting results + // (Don't post confusing all-zero results when poll data is unavailable) + logger.warn( + { nomineeId: nominee.id, nomineeName: nominee.name }, + 'Vote period expired but poll results could not be read - skipping results post' + ); } } else { logger.error(