fix: Handle UNKNOWN_MESSAGE exception in SuggestionsUpDownVoter#1415
Open
Bryce72 wants to merge 4 commits intoTogether-Java:developfrom
Open
fix: Handle UNKNOWN_MESSAGE exception in SuggestionsUpDownVoter#1415Bryce72 wants to merge 4 commits intoTogether-Java:developfrom
Bryce72 wants to merge 4 commits intoTogether-Java:developfrom
Conversation
…ly with an INFO log instead Together-Java#1414
ankitsmt211
requested changes
Feb 13, 2026
Member
ankitsmt211
left a comment
There was a problem hiding this comment.
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.
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
…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
ankitsmt211
requested changes
Feb 13, 2026
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
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.
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.