Don't show a scary chat error for non-critical update/MOTD check failures - #38
Open
kovalancik06-max wants to merge 1 commit into
Open
Conversation
…ures The update-check and MOTD fetch run in a background thread on every Hypixel connect and are purely cosmetic. On clients with an outdated Java trust store this throws SSLHandshakeException, which was caught and surfaced as a red "An error has occured" chat message every session (Quantizr#31, Quantizr#33) - alarming for something that isn't actionable by the player and doesn't affect the mod's actual functionality. Log it instead.
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.
Summary
Dungeon Rooms: An error has occured. See logs for more details.chat message on every Hypixel connect.onServerConnectfetches the latest GitHub release (update check) and a MOTD gist over plainHttpURLConnection. On clients with an outdated bundled Java trust store, this throwsSSLHandshakeException: PKIX path building failed(see both issues' attached logs, identical stack trace atDungeonRooms.java:247).catchblock surfaced it as an alarming, unactionable red error every single session.Fix
printStackTrace()with a quietlogger.warn(...)call. The failure is still visible in the log file for anyone who wants to investigate, but no longer interrupts/alarms players for something they can't fix and that doesn't matter.Test plan
Loggerfield (logger.warn(String, Throwable)), no new imports/behavior elsewhere.