Skip to content

fix: Handle UNKNOWN_MESSAGE exception in SuggestionsUpDownVoter#1415

Open
Bryce72 wants to merge 4 commits intoTogether-Java:developfrom
Bryce72:develop
Open

fix: Handle UNKNOWN_MESSAGE exception in SuggestionsUpDownVoter#1415
Bryce72 wants to merge 4 commits intoTogether-Java:developfrom
Bryce72:develop

Conversation

@Bryce72
Copy link

@Bryce72 Bryce72 commented Feb 13, 2026

Fixes #1414
When a spam message is posted in the suggestions channel, both ScamBlocker and SuggestionsUpDownVoter react to it. If ScamBlocker deletes the message first, SuggestionsUpDownVoter throws an ErrorResponseException [10008] (UNKNOWN_MESSAGE) when trying to create a thread or react.
This PR explicitly handles that exception and logs it as INFO instead of ERROR, since it's expected behavior.

@Bryce72 Bryce72 requested a review from a team as a code owner February 13, 2026 01:57
@CLAassistant
Copy link

CLAassistant commented Feb 13, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ankitsmt211 ankitsmt211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't know for a fact that message was deleted by scamBlocker(most likely yes) but it's a good idea to keep things more to the point. We only know message was no longer available so we stick to that.

…ly with an INFO log instead Together-Java#1414

Refactored and idomaticized
…ly with an INFO log instead Together-Java#1414

Refactored and idomaticized -- oops updated to make sure its similar via both react and create thread
@Bryce72 Bryce72 requested a review from ankitsmt211 February 13, 2026 13:46
@Bryce72 Bryce72 requested a review from ankitsmt211 February 13, 2026 14:05
Copy link
Member

@ankitsmt211 ankitsmt211 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@Bryce72 Bryce72 requested a review from Zabuzard February 13, 2026 19:58
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.

SuggestionsUpDownVoter should have UNKNOWN_MESSAGE exception gracefully with an INFO log instead

4 participants